global_settings { assumed_gamma 1.0 ambient_light 1 adc_bailout 0.000001 max_trace_level 250 } #include "Functions.inc" camera{ up y right x*image_width/image_height angle 25 location <0,150,-300> look_at <0,40,0> } #declare LB=sphere{0 10.0 texture{pigment{rgb 1} finish{ambient 25}}} light_source{0 rgb 1 looks_like{LB} fade_power 2 fade_distance 800 translate <0,25,-250> } light_source{0 rgb 1 fade_power 2 fade_distance 400 translate <0,500,-50> } background {rgb 0} #default{finish{ambient 0 diffuse 0.7}} // // Blurred reflection material macro // Trevor G. Quayle, June 2002 // For POV-Ray 3.5+ // // #macro MBlur(Amt,Typ,Pig,Ir,Met,NS,WF) // // Amt = amount of blur (0=none >0=more) // Typ = type of blur // 0 = no blur // 1 = isotropic // 2 = radial on x-y plane, centred at origin // 3 = anisotropic horizontal // 4 = anisotropic vertical // Col = material pigment // Ir = ior of material (affects reflectivity) // Met = metallic (0-1) // NS = Number of samples for averaging (1-256) // WF = Waveform type // 0 = ramp // 1 = triangle // 2 = sine // 3 = scallop // 4 = cubic // 5n.n = poly where n.n = exponent // #macro MBlur(Amt,Typ,Pig,Ir,Met,NS,WF) #switch (Typ) #case (1) #local Funky = function(x,y,z) {f_noise3d(x,y,z)} #break #case (2) #local Funky = function(x,y,z) {min(-sqrt(1-pow(mod(sqrt(pow(x,2)+pow(y,2)),2)-1,2)),0)} #break #case (3) #local Funky = function(x,y,z) {-abs(f_noise3d(x/150,y,z/150)-.5)*2} #break #case (4) #local Funky = function(x,y,z) {-abs(f_noise3d(x,y/150,z)-.5)*2} #break #else #local Funky = function(x,y,z) {0} #end texture{ average texture_map{ #local j=0; #local k=seed(0); #while (j)*5 } ] #local j=j+1; #end } } interior{ior Ir} #end // // end of MBlur macro // plane{y 0 pigment{checker rgb <1,0,0> rgb 0} translate x/2 scale 15 } // #macro MBlur(Amt,Typ,Pig,Ir,Met,NS,WF) #declare Amt=0.1; // Blur level = 0.1 #declare Typ=2; // Blur type 2 = radial #declare Pig=pigment{rgb 1}; // material pigment #declare Ir =25; // Ior value (needed for fresnel reflection) #declare Met=1; // metallic value #declare NS=20; // # samples used #declare WF=1; // waveform of normal (1=triangle_wave) #declare M1=material{MBlur(Amt,Typ,Pig,Ir,Met,NS,WF)} box{<-50,0,-.5> <50,90,.5> material{M1 translate y*50}}