//Lunar Phases, By Jones and Congdon, building upon a lunar //template designed by Lohmeuller (original file stamp included). //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- // PoVRay 3.7 Scene File "planet_00ani.pov" // for use with animation ini file "planet_00ani.ini" // // A example of animated planets. // author: Friedrich A. Lohmueller, June-2006/Aug-2009 // email: Friedrich.Lohmueller_at_t-online.de // homepage: http://www.f-lohmueller.de //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- #if (version < 3.7) global_settings{ assumed_gamma 1.0 } #end #default{ finish{ ambient 0.006 diffuse 0.9 }} //-------------------------------------------------------------------------- #include "colors.inc" #include "textures.inc" #include "glass.inc" #include "metals.inc" #include "golds.inc" #include "stones.inc" #declare Time = clock - 0.00 ; // Time = 0 ~ 1 in 1 year !!! //----------------------------------------------------------------------------- // Rotations in the according orbits: #declare Earth_around_Sun_Rotation = 360*Time; // 1 turn per year #declare Moon_around_Earth_Rotation = 360*Time*12 ; // ~ 12 months // Rotations around their own axes: #declare Earth_Rotation = 360*Time*30; // ~360 days per year //------------------------------------------------------- dimensions #declare Moon_Orbit_Radius = 4; // real: 384 000 km #declare Earth_Orbit_Radius = 16; // real: 150 000 000 km //------------------------------------------------------------------ #declare Moon_Radius = 0.85 ; // real: 1 738 km #declare Earth_Radius = 2.0; // real: 6 378 km flatness: 1/298 #declare Sun_Radius = 3; // real: 696 000 km //------------------------------------------------------------------ //-------------------------------------------------------------------------- // camera ------------------------------------------------------------------ #declare Camera_1 = camera {/*ultra_wide_angle*/ angle 45 // location<0*clock+25*(1-clock),2*clock+47*(1-clock),0*clock> look_at <(Moon_Orbit_Radius+2)*clock,3.7*clock -4*(1-clock),0> //rotate<0,360*12*clock,0> right x*image_width/image_height translate // rotate<0,Earth_around_Sun_Rotation*clock,0> } camera{Camera_1} //---------------------------------------------------------- objects #declare Earth = union{ sphere{<0,0,0>, Earth_Radius texture{ Bright_Blue_Sky scale 0.25 normal {bumps 0.5 scale 0.05} } } //cylinder{<0,0,0>,<0,0,3.5>,0.05 pigment{color Blue} finish{ambient 1.0} rotate<0,-90,0>} } //------------------------------------------- #declare Moon = union{ sphere{<0,0,0>, Moon_Radius pigment{color rgb<1,0.9,0.8>*1.1} normal { granite 0.5 scale 0.5} } //cylinder{<0,0,0>,<0,0,1.5>,0.05 pigment{color Red} finish{ambient 1.0} rotate <0,-Moon_around_Earth_Rotation -90,0> no_shadow } } //------------------------------------------- #declare Sun = light_source{ <0,0,0> color White looks_like{ sphere{ <0,0,0>,Sun_Radius texture{ pigment{ gradient y turbulence 2.75 color_map{ [0.0 color rgb <1,0.7,0.5>] [0.3 color rgb <1,1,0.3>] [0.7 color rgb <1,0.8,0.2>] [1.0 color rgb <1,0.3,0.5>] } scale 1.5 } // end pigment normal { agate 2.00 // bump depth scale 0.5 } finish { ambient 0.9 diffuse 0.1 phong 1 } } // end of texture } // end of sphere } //end of looks_like adaptive 1 jitter } //end of light_source //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //---------------------------------------------- the system: union{ // Earth + Moon object{ Earth // rotate <0,Earth_Rotation,0> } // end Earth object{ Moon translate // rotate <0,Moon_around_Earth_Rotation,0> } // end Moon //(en) then both (as union) moveded by Earth_Orbit_Radius away (in +x) //(de) dann beide (als union) um Erdbahnradius wegschieben translate //(en) and let them rotate around the sun //(de) und um Sonne rotieren lassen // rotate<0,Earth_around_Sun_Rotation,0> } // end of "union" Earth + Moon object { Sun } //----------------------------------------------------------------------------- end