I am making an animation of orbits. So far, I have made it so a planet follows an elliptical path around the sun (which is at the focus). However, the planet orbits at a constant speed. How should I implement code so that it obeys keplers second law and increases in velocity as it moves around the curve close to the centred mass. Code was modelled from: (blender.stackexchange.com/a/91511/15543)
I am wondering is it possible to constrain an object to a path WHILE also have a force acting on it. Would it be possible to add gravity to this while keeping the orbit on its path.