

p.s.: the code are a bit "un-comented"
i'm imaginetedingsoc451 wrote: ↑Fri Mar 08, 2019 3:38 amIgnore it, it is a copy-paste error (I was searching through some github projects at the time)
I used the equation from the following page to calculate speed
https://en.wikipedia.org/wiki/Elliptic_orbit
i have an problem with the algorythm of make an circle with sin and cos
Code: Select all
x = 100
y = 50
point = {x = 50, y = 50}
function foo()
a = math.atan2(y-point.y, x-point.x)
x = x + sin(a)
y = y + cos(a)
end