// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.6 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.6; #include "colors.inc" #include "mrg_misc3.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- sky_sphere { pigment {Blue*.0125 } } cylinder{-y,y,.01 pigment {Green*.6 } scale <1,1.125,1>} torus{1,.01 pigment {Green*.6 }} light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate vrotate(vrotate(<0, 0, -50>,+23*x),y*40) } #declare lclock=clock+0; #declare g = .014; //effective surface gravity, wierd units #declare f_rot = -1.2/100; #declare w=2*pi*f_rot; #declare speed_0=4/40; #declare launch_ang=10; camera { location vrotate( vrotate( <0.0, 0, -3.1>, (45-90*trans((lclock-7)/3))*x ) ,y*360*f_rot*lclock) direction 1.5*z right x*image_width/image_height look_at <0.0, 0, 0.0> //angle 10 } #declare lt1=5; #if(lclock>lt1) union{ torus{.2,.005} cone{-.05*z,.03,.05*z,0 translate .2*x} cone{-.05*z,.03,.05*z,0 translate .2*x rotate y*90} cone{-.05*z,.03,.05*z,0 translate .2*x rotate -y*90} cone{-.05*z,.03,.05*z,0 translate .2*x rotate y*180} scale <1,.1,1> rotate -y*45*lclock translate 1.0001*y rotate -x*20 rotate y*f_rot*360*lclock-8*y pigment{color rgbt <1,1,1,1-.6*ltrans(lclock-lt1)>} no_shadow no_reflection } #end sphere { 0.0, 1 pigment { image_map { jpeg "ear0xuu2_tiff.jpg" //data from maps.jpl.nasa.gov map_type 1 interpolate 4 } rotate y*180 +y*f_rot*360*lclock } finish{ambient .05 diffuse .4} } /**/ /*sphere { 0, 1 pigment{color rgbt Blue+<0,0,0,.85>}} */ #macro runge4(rold,vold,rnew,vnew,dt) #local k1x=vold*dt; #local k1v=-g*rold/pow(vlength(rold),3)*dt; #local k2x=(vold+.5*k1v)*dt; #local k2v=-g*(rold+.5*k1x)/pow(vlength(rold+.5*k1x),3)*dt; #local k3x=(vold+.5*k2v)*dt; #local k3v=-g*(rold+.5*k2x)/pow(vlength(rold+.5*k2x),3)*dt; #local k4x=(vold+k3v)*dt; #local k4v=-g*(rold+k3x)/pow(vlength(rold+k3x),3)*dt; #declare rnew=rold+(k1x+2*k2x+2*k3x+k4x)/6; #declare vnew=vold+(k1v+2*k2v+2*k3v+k4v)/6; #end //orientation angles #macro traject(qy,qz,qx,qy2) #declare r0=(1.01)*y; #declare v0=vrotate(-z*speed_0,launch_ang*x); #declare r0=vrotate(r0,y*qy); #declare r0=vrotate(r0,z*qz); #declare r0=vrotate(r0,x*qx); #declare r0=vrotate(r0,y*qy2); #declare v0=vrotate(v0,y*qy); #declare v0=vrotate(v0,z*qz); #declare v0=vrotate(v0,x*qx); #declare v0=vrotate(v0,y*qy2); #declare v0=v0+vcross(w*y,r0); #declare r1=r0; #declare v1=v0; #declare d_t =.01; #declare Dti=.75; #declare tt=0; #declare ti=0; #while (tt=Dti) sphere {r1, .0075 pigment {color rgbt Red+.3*Green+Yellow +<0,0,0,.4>} rotate y*f_rot*360*(lclock-tt) no_shadow no_reflection } #declare ti=0; #end #end sphere {r1, .01 pigment {color rgb Red } } #end traject(0,0,-2,0) traject(-58,30,0,-30) traject(58,-30,0,+30) traject(180,0,-50,0) /**/ //traject(-90,0,0,0) //new version, for southern hemisphere,delayed #macro trajectdu(qy,qz,qx,qy2) #declare duc=max(0,lclock-5); #declare r0=(1.01)*y; #declare v0=vrotate(-z*speed_0,launch_ang*x); #declare r0=vrotate(r0,y*qy); #declare r0=vrotate(r0,z*qz); #declare r0=vrotate(r0,x*qx); #declare r0=vrotate(r0,y*qy2); #declare v0=vrotate(v0,y*qy); #declare v0=vrotate(v0,z*qz); #declare v0=vrotate(v0,x*qx); #declare v0=vrotate(v0,y*qy2); #declare v0=v0+vcross(w*y,r0); #declare r0=; #declare v0=; #declare r1=r0; #declare v1=v0; #declare d_t =.01; #declare Dti=.75; #declare tt=0; #declare ti=0; #while (tt=Dti) sphere {r1, .0075 pigment {color rgbt Red+.3*Green+Yellow +<0,0,0,.4>} rotate y*f_rot*360*(duc-tt) no_shadow no_reflection } #declare ti=0; #end #end sphere {r1, .01 pigment {color rgb Red } } #end trajectdu(0,0,-2,0) trajectdu(-58,30,0,-30) trajectdu(58,-30,0,+30) trajectdu(180,0,-50,0) #declare lt2=12; #if(lclock>lt1) union{ torus{.2,.005} cone{-.05*z,.03,.05*z,0 translate .2*x} cone{-.05*z,.03,.05*z,0 translate .2*x rotate y*90} cone{-.05*z,.03,.05*z,0 translate .2*x rotate -y*90} cone{-.05*z,.03,.05*z,0 translate .2*x rotate y*180} scale <1,.1,1> rotate -y*45*lclock translate 1.0001*y rotate -x*20 rotate y*f_rot*360*lclock+15*y scale <1,-1,1> pigment{color rgbt <1,1,1,1-.6*ltrans(lclock-lt1)>} no_shadow no_reflection } #end #declare cel_sphr_rad=40000; #declare stars=union{ #declare ra=0; #declare dec=0; #declare mag=0; #declare con="aaa"; #fopen MyFile "decimal_yale.csv" read #read (MyFile,ra,dec,mag,con) #while (mag<=6) sphere { <0, 0, -cel_sphr_rad>, 0.0025*(1-mag/14)*cel_sphr_rad texture{ pigment{color rgb 1*(1-mag/6)} finish{ambient 2 diffuse 0} } rotate x*dec //rotate -z towards y for "altitude" like declination rotate -y*ra //right ascension in a left handed coord system... } #read (MyFile,ra,dec,mag,con) #end #fclose MyFile }; object { stars}