// Persistence of Vision Ray Tracer Scene Description File // File: .pov // Desc: // Date: // Auth: // ==== Standard POV-Ray Includes ==== #include "colors.inc" // Standard Color definitions #include "textures.inc" // Standard Texture definitions #include "functions.inc" // internal functions usable in user defined functions #include "math.inc" // several different gold colors, finishes and textures #include "golds.inc" // various metal colors, finishes and textures // brass, copper, chrome, silver #include "metals.inc" #include "textures.inc" #declare lclock=clock+.0; #declare camera_scale=10; //background{Blue} camera { location camera_scale*<0,5, -12> look_at <-.75, 0, 0> angle 10/camera_scale } global_settings { assumed_gamma 1.0 ambient_light rgb <1, 1, 1> } // wave specific delcarations #declare vv=4; #declare L=1; #declare A=.2; //pulse shape declarations // a "smoothly turning on" function //(0 off to 1 on transitions) //tt is "current time" //tt0 is turn on time start //dtt is turn on time duration #declare transitor=function(tt,tt0,dtt) { .5*(1-cos(min(max(tt-tt0,0),dtt)/dtt*pi))} #declare pulse = function(xx){transitor(-xx-1.5,0,.2)-transitor(-xx-1.5,.2,.4)} /**/ #declare x_function = function(xx) {xx } #declare y_function = function(xx) {A*(pulse(xx-vv*lclock)-pulse(-xx-vv*lclock))+.35} #declare z_function = function(xx) {0 } #declare s_start=-2; #declare s_end=0; #declare s_nseg=200; #declare cyl_width=.01; /* generic parametric curve: parm_curve(x_function,y_function,zfunction,s_start,s_end,s_nseg,cyl_width */ #declare s_count=1; #declare s_ds=(s_end-s_start)/(s_nseg); #declare temp_v1=; #declare curve_obj= union{ #while (s_count <= s_nseg) #declare s_this=s_start+s_count*s_ds; #declare temp_v2=; #cylinder{ temp_v1,temp_v2,cyl_width} #declare temp_v1=temp_v2; #declare s_count=s_count+1; #end } union{ object{curve_obj texture {Cork scale .02} } sphere{y_function(0)*y+.02*x, .03} //second string #declare y_function2 = function(xx) {A*(pulse(xx-vv*lclock)+pulse(-xx-vv*lclock))-.30} /* generic parametric curve: parm_curve(x_function,y_function,zfunction,s_start,s_end,s_nseg,cyl_width */ #declare s_count=1; #declare s_ds=(s_end-s_start)/(s_nseg); #declare temp_v1=; #declare curve_obj2= union{ #while (s_count <= s_nseg) #declare s_this=s_start+s_count*s_ds; #declare temp_v2=; #cylinder{ temp_v1,temp_v2,cyl_width} #declare temp_v1=temp_v2; #declare s_count=s_count+1; #end } union{ object{curve_obj2 texture {Cork scale .02} } } cylinder{(y_function2(0)-.01)*y+.02*x,(y_function2(0)+.01)*y+.02*x, .03 texture{T_Brass_3A}} union{ cylinder{-3*A*y,3*A*y,.02 translate -x*5.02} cylinder{-3*A*y,3*A*y,.02 translate x*.02} texture{T_Chrome_5E}} } // An area light (creates soft shadows) // WARNING: This special light can significantly slow down rendering times! light_source { 0*x // light's position (translated below) color rgb 1.0 // light's color area_light <2.5, 0, 0> <0, 2.5, 0> // lights spread out across this distance (x * z) 8, 8 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <40, 80, -40> // position of light } sky_sphere { pigment { gradient y color_map { [0.000 0.002 color rgb <1.0, 1, 0.8> color rgb <1.0, 1, 0.8>] [0.002 0.200 color rgb <0.8, 0.8, 0.6> color rgb <0.2, 0.2, 0.8>] } scale 2 translate -1 } pigment { bozo turbulence 0.65 octaves 6 omega 0.7 lambda 2 color_map { [0.0 0.1 color rgb <0.85, 0.85, 0.85> color rgb <0.75, 0.75, 0.75>] [0.1 0.5 color rgb <0.75, 0.75, 0.75> color rgbt <1, 1, 1, 1>] [0.5 1.0 color rgbt <1, 1, 1, 1> color rgbt <1, 1, 1, 1>] } scale <0.2, 0.5, 0.2> } rotate -105*x rotate y*90 } plane { //grassy plane y, -3*A texture { pigment { color rgbt Green } finish { phong 600 ambient .1 diffuse .2} } }