// Persistence of Vision Ray Tracer Scene Description File // File: ?.pov #version 3.6; #include "math.inc" //----------------------------------------------macros------------------------------------------------- //Definition of a Sphere_Sweep according to positions from an array #macro DrawSphereSweep (ArrayName, Radius, Number) sphere_sweep { cubic_spline // alternative spline curves Number, // number of specified sphere positions #declare ticker = 0; #while (ticker < Number) #declare P1 = ArrayName [ticker]; P1, Radius // position, radius #declare ticker = ticker + 1; #end texture {pigment { color rgb <0, 0, 1> } } } #end //Definition of Spheres according to positions from an array #macro DrawSpheres (ArrayName, Radius, Number) #declare ticker = 0; #while (ticker < Number) #declare P1 = ArrayName [ticker]; sphere { <0, 0, 0>, Radius translate P1 pigment { color rgb <1,1,0> // solid color pigment } } #declare ticker = ticker + 1; #end #end #macro LinearFlecht (PStart, PEnd, Radius, Number, VarianceLength, VarianceAngle) #declare Positions2 = array [Number]; #declare var1 = rand(chance1); #declare Positions2 [0] = PStart-0.1*(PEnd-PStart); #declare Positions2 [Number-1] = PEnd+0.1*(PEnd-PStart); #local ticker = 1; #while (ticker < Number-1) #local P1 = PStart + (ticker-1)*(PEnd-PStart)/(Number-3); #local P2 = VPerp_To_Vector(PEnd-PStart) ; #local P2 = vnormalize (P2) ; #local P1 = P1 + Radius *P2; #local P1 = vaxis_rotate(P1,PEnd-PStart,360 * var1); #local P1 = vaxis_rotate(P1,PEnd-PStart,VarianceAngle*rand(chance3)) ; #declare Positions2 [ticker] = P1; #local ticker = ticker + 1; #end #end //--------------------------------------------end of macros----------------------------------------------- global_settings { assumed_gamma 1.0 max_trace_level 5 } #declare Camera = camera { location <-22, 0, 12> //location <0, 0, 35> look_at <0,0, 12> } camera {Camera} // create a regular point light source light_source { 0*x // light's position (translated below) color rgb <1,1,1> // light's color translate <-100, 50, 0> } light_source { 0*x // light's position (translated below) color rgb <1,1,1> // light's color translate <-40, 50, -80> } light_source { 0*x // light's position (translated below) color rgb <1,1,1> // light's color translate <-30, 50, 800> } //----------------------------------------------------------------------- //Initialization of pseudo-random streams. #local chance1 = seed (13); #local chance2 = seed (15); #local chance3 = seed (23); #declare Positions = array [7]; #declare ticker1 = 0; #while (ticker1 <18) #declare Radius = 2 + 2*(rand(chance1)-0.5); LinearFlecht (<0, 0, 0>, <0, 0, 24>, Radius, 7, 2.8, 100) DrawSphereSweep (Positions2, 0.1, 7) //DrawSpheres (Positions2, 0.11, 7) #declare ticker1 = ticker1 + 1; #end /* sphere { <0, 0, 24>, 0.3 pigment { color rgb <1,0,0> // solid color pigment }} */