Simulating Orbits
问题 So I'm trying to simulate the earth travelling around the sun where the velocity of the earth is determined by the angle its at to the origin and the horizontal. I did this by creating a function that uses tanh (opposite/adjacent) rule for triangles, O_correction(x,y) . The problem is that instead of a circular orbit its instead spiralling out and I'm not sure why. scene = canvas() scene.background = color.white O = 0 ball = sphere(pos=vector(10,0,0), radius=0.1, color=color.blue) x = ball