/* Antialias=on Antialias_Threshold=0.1 Antialias_Depth=3 Input_File_Name=diurnal.pov Output_File_Name=diurnal Initial_Frame=1 Final_Frame=480 Initial_Clock=0 Final_Clock=12 Cyclic_Animation=on Pause_when_Done=off */ #version 3.6; #include "colors.inc" #include "mrg_misc3.inc" #include "body.inc" global_settings { assumed_gamma 1.0 ambient_light 1 } #declare t1=5; #declare t2=6; #declare dt2=3; // ---------------------------------------- #declare RPS=.06; #declare lclock=clock+0; #declare q=40; #declare rotate_or= -y*360*RPS*lclock; #declare eta=vrotate(vrotate(y,q*z),rotate_or); #declare uv=vrotate(vrotate(-x, q*z),rotate_or); #declare cpos=1.01*eta*(1-trans((lclock-t2)/dt2))+(.5*eta-.2*uv)*(trans(lclock-t1)-trans((lclock-t2)/dt2))+(-5*x+3*y)*trans((lclock-t2)/dt2); #declare lookit=(1.01*eta+.2*uv)*(1-trans((lclock-t2)/dt2)); #declare uppy=vrotate(vrotate(y,q*(1-trans((lclock-t2)/dt2))*z),rotate_or);; camera { //angle 40 //angle for thumbnail location cpos sky uppy look_at lookit } object{body translate -.7*y rotate y*120 scale .0075 rotate q*z translate vrotate(y,q*z)+.1*vrotate(-x, q*z) rotate rotate_or } sphere { 0.0, 1 texture { pigment { image_map { jpeg "land_ocean_ice_2048.jpg" map_type 1 interpolate 4 } } finish{ ambient .1 diffuse .8} normal { bump_map { jpeg "etopo-land_tiff.jpg" map_type 1 interpolate 4 bump_size 5 } } } rotate rotate_or } #declare T2=1; #declare cel_sphr_rad=100; #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.00525*(1-mag/7)*cel_sphr_rad texture{ pigment{color rgb 1*(1-mag/7)} finish{ambient 20 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 #declare cline_rad=0.00525*.25*cel_sphr_rad; #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 10 diffuse 0} } #end #declare cline_start=cline_end; #end #fclose MyFile2 #end }; object{stars}