How would I accurately simulate orbital motion in desmos?

337 Views Asked by At

Basically, I've been wanting to make a map of a fictional solar system which moves accurately. I have a circle to represent the parent star, a circle representing the planet, which is moving around a circular path using the following equation: $$\left(x+\sin\left(A_{\text{ugustusPos}}\right)A_{\text{ugustusOrbit}}\right)^{2}+\left(y+\cos\left(A_{\text{ugustusPos}}\right)A_{\text{ugustusOrbit}}\right)^{2}\le\frac{A_{\text{ugustusRadius}}}{23454.8}$$ Where $A_{\text{ugustusOrbit}}$ represents the semi-major axis of the planet in AU, $A_{\text{ugustusRadius}}$ represents the radius of the planet in Earth radii, and $A_{\text{ugustusPos}}$ represents its position in its orbit.

I want to make this system move at an accurate relative speed to the other planets, using a single slider to control the time. Assume that the planet Augustus (the one in the equation I sent) is the baseline, as it's the innermost planet. I'm okay with the equation being super messy, as it'll be hidden anyway.

1

There are 1 best solutions below

0
On BEST ANSWER

Okay, so after a bit of research, I've found these formulas: $$f\left(x\right)=r\cos\left(2\pi\frac{x}{P}\right)$$ $$g\left(x\right)=r\sin\left(2\pi\frac{x}{P}\right)$$ Where $r$ is the semi-major axis, and $P$ is the orbital period, using kepler's third law, which is: $$P=\sqrt{\frac{a^{3}}{M}}$$ And after a bit of thinking and experimentation, I've come up with this to describe the position of the planet: $$\left(f\left(t\right),g\left(t\right)\right)$$ Which in order to use in my equation, you'd use: $$\left(x+f\left(t\right)\right)^{2}+\left(y+g\left(t\right)\right)^{2}\le\frac{A_{ugustusRadius}}{23454.8}$$