The sixth in a series of tutorial videos designed to teach planetarians (or anyone interested!) how to make high-quality planets using Steven Glanville's Anim8or, a free program available from anim8or.com/.

In this tutorial we look at making orbits for moons and planets, and a couple of different methods, including easy synchronous orbits. Neptune texture is from from James Hastings-Trew's Planetary Pixel Emporium: planetpixelemporium.com/ .

The formula for an orbit used in the video is as follows (except I changed the 200s to 150s):

float \$speed;
\$speed = PI/20.;
\$position = (200.*cos(\$speed*time), 0., -200.*sin(\$speed*time));

In this formula, the value by which pi is divided should be twice the amount of time you want it to take your object to cover 90 degrees of its orbit (so, in this example script, the object will take a total of 40 seconds to make one complete orbit). This formula only works at 30fps, if you change the frame rate, you will have to do some conversion work. I think it also only work correctly in the very latest preview for anim8or, as anim8or previously used 3 as a the value for PI, and only recently corrected that to 3.141... I think because of this you may have some bugginess as you try it out.

By the way, here's a fun modification to try to give your orbit some tilt:

float \$speed;
\$speed = PI/20.;
\$position = (200.*cos(\$speed*time), 50.*cos(\$speed*time), -200.*sin(\$speed*time));
(on tilt, cos for X axis, sin for y axis).

I imagine one could easily modify these to make relatively accurate ellipses too. Play around! I also bet that stuff like this could be a great way to show people the practical applications and purpose of trigonometry.