#ifndef(Angle) #declare Angle=radians(60); #end #ifndef(LightAngle) #declare LightAngle=radians(50); #end #ifndef(EarthRot) #declare EarthRot=0; #end #ifndef(PlanetBright) #declare PlanetBright=0.4; #end #ifndef(Dist) #declare Dist=2.5; #end #ifndef(South) #declare South=0; #end #include "Stars.inc" object {Stars} #macro blinterp(x1,y1,x2,y2,x0) #local t0=(x0-x1)/(x2-x1); #local y0=y1*(1-t0)+y2*t0; #if(y1y2) #local y0=y2; #end #else #if(y0>y1) #local y0=y1; #end #if(y0}} texture {pigment {color rgb <0,0,PlanetBright>}} } rotate x*90 rotate -z*90 } } difference { sphere { 0,(6378+83)/6378 } texture { material_map { png CloudMap map_type spherical #local i=0; #while(i<255) texture {finish {ambient 1 diffuse 0} pigment {color rgbf <1,1,1,blinterp(0,1,128,0,i)>}} #local i=i+1; #end } } rotate y*180 no_shadow } #if(South) rotate x*180 #end } camera { right y*image_width/image_height location <0,-cos(Angle),sin(Angle)>*Dist+z*0.7 look_at <0,0,0.7> angle 40 rotate z*EarthRot } light_source { <0,-cos(LightAngle),sin(LightAngle)>*Dist*1000+z*0.7 color 1 rotate z*EarthRot }