// // 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 //