// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov // Vers: 3.1 // Desc: Basic Scene Example // Date: mm/dd/yy // Auth: ?[esp] // #version 3.1; #include "colors.inc" global_settings { assumed_gamma 1.0 } // ---------------------------------------- camera { location <0.0, 0.5, -4.0> direction 1.5*z right 4/3*x look_at <0.0, 0.0, 0.0> } sky_sphere { pigment { gradient y color_map { [0.0 color blue 0.6] [1.0 color rgb 1] } } } light_source { 0*x // light's position (translated below) color red 1.0 green 1.0 blue 1.0 // light's color translate <-30, 30, -30> } // ---------------------------------------- #macro PlotList(lst) #declare c = 0; #declare TL = 0; #render "\n" #while ( c < dimension_size(lst,1) ) #render concat( "\n\nThis.x is : " + str(lst[c].x,1,4) ) #render concat( "\nThis.y is : " + str(lst[c].y,1,4) ) #render concat( "\nThis.z is : " + str(lst[c].z,1,4) ) sphere { lst[c] 0.075 pigment { rgb <0,1,0> } finish { phong 1 } } #if ( c > 0 ) #local thisL = vlength(lst[c] - lst[c-1]); #render concat ("\nLength is : " + str(thisL,1,6) ) #declare TL = TL + thisL; #if (thisL > 0) cylinder { lst[c-1] lst[c] 0.035 pigment { rgb <0,0.5,0> } finish { phong 1 } } #end #end #declare c = c + 1; #end #render concat ("\nTotal Length is : " + str(TL,1,6) ) #end #fopen MyFile "pointlist.txt" read //#declare len = 0; #read (MyFile,len) #declare tlist = array[len] #declare tlist[0] = <1,2,3>; #declare cnt = 0; #while ( cnt < dimension_size(tlist,1) ) #declare tlist[cnt] = <0,0,0>; // #read (MyFile,tlist[cnt]) #declare cnt = cnt + 1; #end #declare cnt = 0; #declare tvx = 0; #declare tvy = 0; #declare tvz = 0; #while ( cnt < dimension_size(tlist,1) ) #declare MuVect = <0,0,0>; #read (MyFile,MyVect) #declare tlist[cnt] = MyVect; #render concat( "\n\nThis.x is : " + str(tlist[cnt].x,1,4) ) #render concat( "\nThis.y is : " + str(tlist[cnt].y,1,4) ) #render concat( "\nThis.z is : " + str(tlist[cnt].z,1,4) ) #declare cnt = cnt + 1; #end #fclose MyFile PlotList(tlist)