I think the problem is the way you're drawing the circles. The way you're doing it, the dots don't travel at a constant speed. The problem as I see it, is how to track the path of a moon orbiting a planet. Please see this remix, there are comments inside. Hopefully this helps! You can adjust the "speed2" variable to get different patterns, like a spirograph!
Click or press any key to clear.