#include "colors.inc" #include "stars.inc" #include "screen.inc" global_settings { assumed_gamma 1.0 } #declare framepertime = 90;//need this, ini values are not passed! // frequencies are in rotations per unit time #declare omega_earth_rotate = -5*360; #declare omega_venus_rotate = 1.05*360; #declare reo=1; // radius of earth's orbit #declare rvo=.72*reo; // radius of venus' orbit #declare omega_earth_orbit = 1; #declare omega_venus_orbit = omega_earth_orbit*pow((reo/rvo),1.5);//ala kepler #declare ssize=.06*reo; // sun radius #declare esize=.6*ssize; // earth radius #declare vsize=1*esize; // mars radius #declare phaser = function(time,f,delta) { (time*f+delta)*2*pi } #declare t_offset = -.5;// initial time phase relative to retrograde #declare localtime=clock+ t_offset; #declare epx = reo*cos(phaser(localtime,omega_earth_orbit,0)); #declare epz = reo*sin(phaser(localtime,omega_earth_orbit,0)); #declare px = rvo*cos(phaser(localtime,omega_venus_orbit,0)); #declare pz = rvo*sin(phaser(localtime,omega_venus_orbit,0)); #macro Make_Earth (tt) sphere {0,1 //basic earth, possibly transparant texture { pigment { agate color_map { [0.0 color rgbt <.05,.05,.4,tt> ] [0.4 color rgbt <.2,.1,.1,tt> ] [1.2 color rgbt <.7,.7,.7,tt> ] } turbulence .3 } finish { ambient 1.0 diffuse 0.0 } } scale esize } #end #macro Make_Venus (tt) sphere {0,1 //basic venus, possibly transparant texture { pigment { wood color_map { [0.0 color rgbt <.7,.7,.5,tt> ] [0.25 color rgbt <.64,.64,.55,tt> ] [0.5 color rgbt <.75,.75,.55,tt> ] [0.75 color rgbt <.94,.94,.90,tt> ] } ramp_wave turbulence .2 scale y*.150 } finish { ambient 0.03 diffuse 1.0 } //rotate x*90 } texture { pigment { cylindrical color_map { [0.0 color rgbt <.6,.5,.5,.5*(1+tt)> ] [.4 color rgbt <.75,.7,.7,.5*(1+tt)> ] [.7 color rgbt <.9,.9,.9,.5*(1+tt)> ] } scale y*.09 rotate x*10 turbulence .5 } finish { ambient 0.03 diffuse 1.0 } } scale vsize } #end #declare sun = sphere {0,ssize //sun texture { pigment { color rgb <.8,.8,0>} finish { ambient 1.0 diffuse 0.0 } } no_shadow } #declare solarsys1 = union{ object{sun scale 1.5} object{ Make_Earth (0) rotate y*omega_earth_rotate*localtime scale 2 translate (epz*z+epx*x) } object{ Make_Venus (0) rotate y*omega_venus_rotate*localtime scale 2 translate (pz*z+px*x) } box { //background for inset #declare btop = 1.1*ssize; #declare bside = 1.2*reo; <-bside, -btop, -bside>, pigment { color rgb .1*<.1,.1,.1>} finish {ambient 1.0 diffuse 0.0 } } } #declare solarsys2 = union{ object{sun} object{ Make_Venus (0) rotate y*omega_venus_rotate*localtime translate (pz*z+px*x) } } object{ solarsys2 } Set_Camera_Location(epz*z+epx*x) Set_Camera_Look_At(pz*z+px*x-1.2*vsize*y) Set_Camera_Angle(75) Screen_Object ( object{solarsys1 scale 3.68 rotate -90*x translate 4*(5*z+2.6*x-1.4*y) }, <0,.00>, .0, false ,1) sky_sphere { // rgb - Red Green Blue color shortcut pigment{color rgb 0*<0.1, 0.1, 0.1>} //finish { diffuse 0 ambient 1 } } light_source { 0*x // light's position (translated below) color rgb <1,1,1> // light's color } // we need CONSTELLATIONS! #declare icount = 0; #declare rrx=0; #declare rry=0; #declare rrz=0; #while(icount<2000) #declare rrx=rrx+abs(sin(52*icount)); #declare rry=rry+abs(sin(57*icount)); #declare rrz=rrz+abs(sin(27*icount)); sphere { <0, 0, 0>, 0.3 pigment { color rgb 1*<.5+.5*sin(icount),.5+.2*sin(2*icount),.7+.3*cos(icount)>} finish {ambient 1.0 diffuse 0.0 } translate 100 rotate 3570* } #declare icount=icount+1; #end