// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.5 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ? // /* Antialias=on Antialias_Threshold=0.2 Antialias_Depth=3 Input_File_Name=Joule_expansion.pov Output_File_Name=JE Initial_Frame=1 Final_Frame=400 Initial_Clock=.0 Final_Clock=2 Cyclic_Animation=off Pause_when_Done=off +FC */ #version 3.5; #include "colors.inc" #include "rand.inc" #include "textures.inc" #include "metals.inc" #include "mrg_misc2.inc" global_settings { assumed_gamma 1.0 ambient_light <1,1,1>*.7 } #declare lclock=clock+.0; //containers parameters #declare L1=.5; #declare T1=.2; //atom parameters #declare N =500; #declare atom_r = array[N]; #declare atom_v = array[N]; #declare speed = 100; //initialize the atoms #if (frame_number != 0 & frame_number != 1)//is this test render or first frame? #include "joule_exp_scratch.inc" #else #declare ic=0; #declare Stream=.111; #while(icT1) #declare rightb=5/2*L1; #end #declare dt=.01; #declare ic=0; #while(ic; #declare newv=<-newv.x,newv.y,newv.z>; #end #if(newr.x>=rightb) //right #declare newr=<2*rightb-newr.x,newr.y,newr.z>; #declare newv=<-newv.x,newv.y,newv.z>; #end #if(newr.y<=-L1/2) //bottom #declare newr=; #declare newv=; #end #if(newr.y>=L1/2) //top #declare newr=; #declare newv=; #end #if(newr.z<=-L1/2) //front #declare newr=; #declare newv=; #end #if(newr.z>=L1/2) //back #declare newr=; #declare newv=; #end #declare atom_r[ic]=newr; #declare atom_v[ic]=newv; #declare ic=ic+1; #end #fopen next "joule_exp_scratch.txt" write #declare ic=0; #while(ic direction 1.5*z right x*image_width/image_height look_at } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 50, -40> } // ---------------------------------------- #declare boxthickness=.005; #declare panel = box{-(L1/2+boxthickness)*<1,1,1>,L1/2*<-1,1,1>+boxthickness*(y+z)} #declare halfpanel=box{L1/2*<0,-1,-1>, L1/2*z+boxthickness*<1,0,0> translate L1/2*x translate -y*L1/2*ltrans((lclock-T1)/.0001) } union{ object{panel} object{panel rotate z*90} object{panel rotate z*-90} object{panel rotate y*90} //object{panel rotate y*180} object{panel rotate z*90 translate L1*x} object{panel rotate z*-90 translate L1*x} object{panel rotate y*90 translate L1*x} object{panel rotate z*90 translate 2*L1*x} object{panel rotate z*-90 translate 2*L1*x} object{panel rotate y*90 translate 2*L1*x} object{panel rotate y*180 translate 2*L1*x} object{halfpanel} object{halfpanel scale <1,-1,1>} texture{T_Silver_3A} no_shadow no_reflection }