#include "colors.inc" #include "stars.inc" #include "screen.inc" global_settings { assumed_gamma 1.0 } #declare omega_earth_rotate = -20; #declare omega_ems_rotate =-6; #declare rm=1; // radius of moon's orbit #declare reo=3; // radius of earth's orbit #declare tilt=20; // tilt of moon's orbital plane (was 12) #declare msize= .1*rm; // moon's size #declare esize= 2*msize; // moon's size #declare ssize= msize*reo/rm; // moon's 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 } #declare sun = sphere {0,ssize //sun texture { pigment { color rgb <.8,.8,0>} finish { ambient 1.0 diffuse 0.0 } } } #declare moon = sphere {0,1 //moon, unsized texture { pigment { agate color_map { [0.0 color rgb 0.2 ] [1.0 color rgb .8 ] } } finish { ambient 1.0 diffuse 0.0 } } } declare ems = union{ //earth-moon system with decorations object{earth scale esize} object{moon scale msize translate -z*rm} torus { rm, 0.04 pigment { color rgb .5*<.4,.4,1>} //moon's orbit finish {ambient 1.0 diffuse 0.0 } } cylinder { <0, 0, -1.3*rm>, <0, 0, 1.3*rm>, .04 //line of nodes pigment { color rgb .8*<.8,.1,.1>} finish {ambient 1.0 diffuse 0.0 } rotate -omega_ems_rotate*360*clock*y} rotate omega_ems_rotate*360*clock*y rotate tilt*z } declare ems2 = union{ //earth-moon system sans earth //object{earth scale esize} object{moon scale msize translate -z*rm} rotate omega_ems_rotate*360*clock*y rotate tilt*z } declare solar_sys=union{ //solar system object{sun} object{ems translate reo*(z*cos(-clock*2*pi)+x*sin(-clock*2*pi))} box { //background for inset #declare btop = max(sin(pi*tilt/180)*(reo+msize), ssize); #declare bside = 1.4*(reo+rm); <-bside, -btop, -bside>, pigment { color rgb .5*<.1,.1,.1>} finish {ambient 1.0 diffuse 0.0 } translate bside*(.5*z+.2*x)} torus { reo, 0.04 pigment { color rgb .3*<.1,.4,.1>} //earth's orbit finish {ambient 1.0 diffuse 0.0 } } } declare solar_sys2=union{ //solar system sans earth object{sun} object{ems2 translate reo*(z*cos(-clock*2*pi)+x*sin(-clock*2*pi))} } #declare ssscale=1; object{solar_sys2 scale ssscale} //solar system sans earth is main object, we're looking at sun from eath's center Set_Camera_Location(ssscale*reo*) Set_Camera_Look_At(<0.0, -.25, 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) /*light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 30, -30> }*/ 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 } }