// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.5 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // #version 3.5; #include "colors.inc" #include "body.inc" #include "mrg_misc2.inc" global_settings { assumed_gamma 1.0 ambient_light color rgb <.5,.5,.5> } /* Transitions start looking over figure's shoulder towards south stars are slowly moving, compass points are in view T1 move view upwards so that horizon is near bottom of FOV T2 fade in constellation lines T2p5 fade in celestial sphere coordinate lines T3 translate viewpoint to outside celestial sphere */ #declare lclock=clock+0; #declare T1=transitor(lclock,.2,.1) ; #declare T2=transitor(lclock,.3,.1) ; #declare T2p5=transitor(lclock,.5,.1) ; #declare T3=transitor(lclock,.7,.2) ; //#declare T2=1; // ---------------------------------------- //north is +z direction camera { location <0, 2, 10.0>*(1-T1)+<0, 1.75, 1.5>*(T1-T3)+<1, 1, +1.0>*T3*60 // location (3*z+2*y)*4 direction 1.5*z right x*image_width/image_height look_at <0.0, 2,0>*(1-T1)+<0.0, 2.65,0>*(T1-T3)+<0.0, 0,0>*T3 // look_at -100*z+10*y angle 80*(1-T1)+90*(T1-T3)+60*T3 /*start location <-.75, 2, 10.0> look_at <0.0, 2,0> angle 80 */ /*T1 location <-.75, 1.75, 1.5> direction 1.5*z right x*image_width/image_height look_at <0.0, 2.65,0> angle 90 */ /*final location <-2.0, 30, +100.0> look_at <0.0, 0,0> angle 60 */ } #declare cel_sphr_rad=40; #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) #declare star_origin=cel_sphr_rad*(z); #declare altitude_axis=vcross(star_origin,y); #declare altitude_axis=altitude_axis/vlength(altitude_axis); #while (mag<=6) sphere { star_origin, 0.0075*(1-mag/7)*cel_sphr_rad texture{ pigment{color rgb 1*(1-mag/7)} finish{ambient 2 diffuse 0} } rotate altitude_axis*dec //rotate 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 #if(T2>0) #declare ra=0; #declare dec=0; #declare pen=0; #declare con="aaa"; #declare cline_rad=0.0075*.5*cel_sphr_rad; #fopen MyFile2 "pattern.star.csv" read #read (MyFile2,ra,dec,pen,con) #while (pen<=1) //fake last lines #declare cline_start=vrotate(vrotate(star_origin,altitude_axis*dec),-y*ra); #read (MyFile2,ra,dec,pen,con) #declare rflag=ra; #declare cline_end=vrotate(vrotate(star_origin,altitude_axis*dec),-y*ra); #if (pen=1) difference{ cylinder{cline_start,cline_end,cline_rad } union{ sphere{cline_start,2*cline_rad} sphere{cline_end,2*cline_rad} } pigment{color rgbt <.9,.0,.0,.85+.15*(1-T2)>} finish{ambient 1 diffuse 0} } #end #declare cline_start=cline_end; #end #fclose MyFile2 #end #if(T2p5>0) //CELESTIAL SPHERE lines #declare mycount=0; #while (mycount < 6) torus { cel_sphr_rad*1.001, cline_rad*.75 pigment{color rgbt <.9,.7,.5,.9+.1*(1-T2p5)>} finish{ambient 1 diffuse 0} rotate x*90 rotate y*mycount*30 } #declare mycount=mycount+1; #end #declare lmax=4; #declare mycount=-lmax; #while (mycount <= lmax) #declare tr= cos(radians(mycount/(lmax+1)*90))*cel_sphr_rad*1.001; #declare ty= sin(radians(mycount/(lmax+1)*90))*cel_sphr_rad*1.001; torus { tr, cline_rad*.75 pigment{color rgbt <.9,.7,.5,.9+.1*(1-T2p5)>} finish{ambient 1 diffuse 0} translate y*ty } #declare mycount=mycount+1; #end /* //Ecliptic torus { cel_sphr_rad, cline_rad rotate altitude_axis*23 //rotate towards y for "altitude" like declination pigment{color rgbt <.9,.7,.5,.9+.1*(1-T2p5)>} finish{ambient 1 diffuse 0} } */ #end /**//**/ }; #declare lat=45; #declare hour=90*lclock; object { stars rotate y*hour rotate x*lat} #declare pointer=prism { linear_sweep linear_spline 0, // sweep the following shape from here ... .1, // ... up through here 4, // the number of points making up the shape ... <-1,0>, <1,0>, <0,5>, <-1,0> pigment { Green } } #declare subpointer=prism { linear_sweep linear_spline 0, // sweep the following shape from here ... .099, // ... up through here 4, // the number of points making up the shape ... <-.75,0>, <.751,0>, <0,4>, <-.75,0> pigment { Red } } object{pointer} object{pointer rotate y*90} object{pointer rotate y*-90} object{pointer rotate y*180} object{subpointer rotate y*45} object{subpointer rotate y*135} object{subpointer rotate y*-45} object{subpointer rotate y*-135} cylinder{0,.101*y,1.4 texture { pigment{color rgb <.2,.2,.2>} finish{ambient .5 diffuse .5} } } #declare text_texture=texture{ pigment{color rgb 5*<.1,.1,.1>} finish{ambient .9 diffuse .15} } text { ttf "times.ttf", "N", .02, 0 rotate x*90 translate y*.102-x*.35+z*5.2 texture {text_texture} } text { ttf "times.ttf", "S", .02, 0 rotate x*90 translate y*.102-x*.35+z*5.2 rotate y*180 texture {text_texture } } text { ttf "times.ttf", "E", .02, 0 rotate x*90 translate y*.102-x*.35+z*5.2 rotate y*90 texture {text_texture } } text { ttf "times.ttf", "W", .02, 0 rotate x*90 translate y*.102-x*.35+z*5.2 rotate y*-90 texture { text_texture } } #declare LandArea = texture { pigment { agate turbulence .1 lambda 1.8 omega .8 octaves 8 color_map { [0.00 color rgb <.5, .25, .15>] [0.33 color rgb <.1, .5, .4>] [0.86 color rgb <.6, .3, .1>] [1.00 color rgb <.5, .25, .15>] } } } #declare OceanArea = texture { pigment { bozo turbulence .2 lambda 1 color_map { [0.00, 0.5 color rgb <0, 0, 1> color rgb <0, 0, 1>] [0.5, 0.75 color rgbf <1, 1, 1, 1> color rgbf <1, 1, 1, 1>] [0.75, 1.00 color rgb <0, 0, 1> color rgb <0, 0, 1>] } } } cylinder { 0.0, -.2*y, cel_sphr_rad*.98 texture { LandArea scale 8} texture { OceanArea scale 15 translate x*20+z*5} /* texture { pigment{color rgb <.0,.0,.3>} finish{ambient .35 diffuse .25} }*/ } object{body translate y*.145 rotate y*180*0}