#include "colors.inc" #include "stars.inc" #include "screen.inc" global_settings { assumed_gamma 1.0 } //NOT TO SCALE #declare omega_earth_rotate = -20; //earth's spin #declare omega_mars_rotate = -20; //mars' spin #declare reo=1; // radius of earth's orbit #declare rmo=1.2*reo; // radius of mars' orbit #declare omega_earth_orbit = -1; //earth's orbit frequency #declare omega_mars_rotate = omega_earth_orbit*pow((reo/rmo),1.5); //mars' orbit frequency ala Kepler #declare phase_mars_rotate = 0; //mars' orbit initial phase #declare sunsize= .1*reo; // sun's size #declare esize= .6*sunsize; // earth's size #declare msize= esize*1; // mars' size #declare earth = sphere {0,1 //basic earth texture { pigment { agate color_map { [0.0 color rgb <.05,.05,.4> ] [0.1 color rgb <.2,.1,.1> ] [1.2 color rgb <.7,.7,.7> ] } turbulence .2 } finish { ambient 1.0 diffuse 0.0 } } rotate omega_earth_rotate*360*clock*y scale esize } #declare sun = sphere {0,sunsize //sun texture { pigment { color rgb <.8,.8,0>} finish { ambient 1.0 diffuse 0.0 } } } #macro Make_temp_mars (tt) sphere {0,msize //mars texture { pigment { agate color_map { [0.0 color rgbt <.5,.2,.2,tt> ] [1.0 color rgbt <1,.4,.4,tt> ] } } finish { ambient 1.0 diffuse 1.0 } } } #end declare solar_sys=union{ //complete solar system view for inset object{sun} object{earth translate reo*(z*cos(-clock*2*pi)+x*sin(-clock*2*pi))} object{ Make_temp_mars (1) rotate omega_mars_rotate*360*clock*y scale msize #declare mphase = -pi/180*(omega_mars_rotate*clock+omega_mars_rotate); translate rmo*(z*cos(mphase)+x*sin(-mphase)) } } box { //background for inset #declare btop = sunsize; #declare bside = 1.2*rmo; <-bside, -btop, -bside>, pigment { color rgb .5*<.1,.1,.1>} finish {ambient 1.0 diffuse 0.0 } translate bside*(.5*z+.2*x) } declare solar_sys2=union{ //solar system sans earth for big view object{sun} object{earth translate reo*(z*cos(-clock*2*pi)+x*sin(-clock*2*pi))} object{ Make_temp_mars (1) rotate omega_mars_rotate*360*clock*y scale msize #declare mphase = -pi/180*(omega_mars_rotate*clock+omega_mars_rotate); translate rmo*(z*cos(mphase)+x*sin(-mphase)) } } #declare ssscale=1; object{solar_sys2 scale ssscale} //solar system sans earth is main object, we're looking at mars from eath's center Set_Camera_Location(<.001,rmo*4,.001>) Set_Camera_Look_At(<0.0, 0, 0.0>) Set_Camera_Angle(65) /*Screen_Object ( object{solar_sys rotate -5*x scale 10 translate (200*z-60.2*y+60.5*x) }, <0,.00>, .0, false ,1) */ sky_sphere { pigment { granite color_map { [ 0.000 0.270 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ] [ 0.270 0.280 color rgb <.5,.5,.4> color rgb <.8,.8,.4> ] [ 0.280 0.470 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ] [ 0.470 0.480 color rgb <.4,.4,.5> color rgb <.4,.4,.8> ] [ 0.480 0.680 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ] [ 0.680 0.690 color rgb <.5,.4,.4> color rgb <.8,.4,.4> ] [ 0.690 0.880 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ] [ 0.880 0.890 color rgb <.5,.5,.5> color rgb < 1, 1, 1> ] [ 0.890 1.000 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ] } turbulence 35 sine_wave scale 25.5 rotate x*30 } //finish { diffuse 0 ambient 1 } }