#include "colors.inc" camera { location <0,8,-20> look_at <0,0,-5> } light_source { <-100, 100, -100> color Gray90 } #declare my_sphere = sphere { <0.0, 0.0, 0.0>, .3 texture { pigment { color rgb <0, .2, 1> } } } #declare r_d = 180/pi; #declare theta = 0; #macro earth_orbit (theta) #while (theta < 360) #local distance1 = (1 - pow(0.01671,2)) / (1 + 0.01671 * cos(theta - (1.7968*r_d))); object { my_sphere translate <9*distance1, 0, 0> rotate y*theta } #declare theta = theta + 5; #end //end of while #end #declare theta = 0; #macro asteroid_orbit (theta) #while (theta < 360) #local distance1 = (0.937 * (1 - pow(0.232,2)) ) / (1 + (0.232 * cos(theta - (5.22*r_d)))); object { my_sphere texture { pigment { color rgb <.8, .8 , .8> } } translate <9*distance1, 0, 0> rotate y*theta } #declare theta = theta + 5; #end //end of while #end earth_orbit (0) asteroid_orbit(0)