// 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 "golds.inc" #include "metals.inc" global_settings { assumed_gamma 1.0 max_trace_level 6 } // ---------------------------------------- camera { location 10*<0, 0.6, -4.0> // direction 1.5*z // right x*image_width/image_height look_at <0, 0, 0.0> angle 20 } sky_sphere { pigment { gradient y color_map { [0.0 rgb <0.6,0.7,1.0>] [0.7 rgb <0.0,0.1,0.8>] } } } light_source { <0, 0, 0> // light's position (translated below) color rgb <1, 1, 1> // light's color translate <-30, 30, -30> } // ---------------------------------------- plane { y, -4 pigment { color rgb <0.7,0.5,0.3> } } #declare lclock=clock+.5; #declare trans = function(s,L) {(1+sin(pi*min(max(-.5,s/L),.5))) } #declare factor = function(s) {(1-exp(-(s-.5)*(s-.5)/2)) } //#declare x_function = function(s) {3*cos(12*pi*s)*factor(s) } #declare x_function = function(s) {-12*s+6 } #declare y_function = function(s) { 0} //#declare z_function = function(s) { 3*sin(12*pi*s)*factor(s) } #declare z_function = function(s) { 0*s } #declare r_function = function(s) { 2-.6*trans(s-.5,.2) } #declare s_start=0; #declare s_end=1; #declare s_nseg=2000; #declare cyl_width=.4; #declare s_count=1; #declare s_ds=(s_end-s_start)/(s_nseg); #declare temp_v1=; #declare lcurve=0; #declare lpattern=0; #declare r_0=r_function(0); #declare curve_obj= union{ #while (s_count <= s_nseg) #declare s_this=s_start+s_count*s_ds; #declare temp_v2=; #declare r_this=r_function(s_this); #declare dv=temp_v2-temp_v1; #declare dl=vlength(dv); #declare lcurve=lcurve+dl; #declare d_lpattern=dl*((r_this*r_this)/(r_0*r_0)); #declare lpattern=lpattern+d_lpattern; #declare c=vcross(dl*y,dv); #declare cL=vlength(c); #declare rot=<0,0,0>; #if(cL>0) #declare nc=c/cL; #declare rot_angle=acos(vdot(dl*y,dv)/(dl*dl))*180/pi; #declare rot=rot_angle*nc; #end #cylinder{0,d_lpattern*y*1.0,1 texture { pigment { radial frequency 17 /* red fluid color_map { [0.00 color rgb <1,0.2,.2> ] [0.25 color rgb <0.9,0.1,.1> ] [0.5 color rgb <0.5,.0,0.0> ] [0.75 color rgb <0.9,.1,0.1> ] [1.00 color rgb <1,0.2,.2> ] */ /* bluish fluid */ color_map { [0.00 color rgb <.10,0.1,1> ] [0.25 color rgb <0.05,0.05,.7> ] [0.5 color rgb <0.0,.0,0.5> ] [0.75 color rgb <0.05,.05,0.7> ] [1.00 color rgb <.1,0.1,1> ] /* */ } turbulence .3 scale <1,3.8,1> #declare fluid_v=10; translate y*(lpattern+fluid_v*lclock) } finish{ specular 0.2 ambient .9 } } scale rotate rot translate temp_v1 } #declare temp_v1=temp_v2; #declare s_count=s_count+1; #end } object{ curve_obj rotate y*00} #declare armlength=15; #declare potwidth=10; union{ box { <-r_function(0)*2, -4, -r_function(0)*2>, translate x*(r_function(0)+x_function(0))+z*(r_function(0)+z_function(0))} box { <-r_function(1)*2, -4, -r_function(1)*2>, translate x*(-r_function(1)+x_function(1))+z*(r_function(1)+z_function(1))} texture{T_Chrome_3E} } /* union{ cylinder{0*z,-1.5*y,r_0*1.5} cylinder{y_function(1)*y,(y_function(1)+1.5)*y,r_function(1)*1.5} sphere{ -1.5*y,r_0*1.5} sphere{ (y_function(1)+1.5)*y,r_function(1)*1.5} cylinder{-1.5*y,armlength*x-1.5*y,r_0*1.5} cylinder{(y_function(1)+1.5)*y,armlength*x+(y_function(1)+1.5)*y,r_function(1)*1.5} cylinder{-2.5*y,(y_function(1)+2.5)*y,potwidth/2 translate x*(potwidth/2+armlength)} #declare lcount=0; #while (lcount<4) cylinder{-2.*y,-3*y,cyl_width*1.5 translate (potwidth/2-cyl_width*1.5)*x rotate y*(lcount+.5)*90 translate x*(potwidth/2+armlength) } #declare lcount=lcount+1; #end texture{T_Chrome_3E} } */