Create a “tail” for an object that is orbiting

Edit Here is a JSFiddle with the code for the “tail” function commenting out.Solar System JSFiddle I have this object I am working on that has an object orbiting a center mass. That works …