// // POV-Ray Version 3.6 // // edger.pov 2004 Sam Benge // /* This file uses an averaged object pigment to determine the inside and outside edges of an object. A new pattern is produced which can be used as a texture. A texture_map will let you assign different textures to the inside and outside edges of the object.*/ // // #declare R=seed(101); global_settings{ assumed_gamma 1 } #default{ finish{ambient 0} } camera{ fisheye right x*.5*1.33 up y*.5 location<.9,29,-44> look_at<0,2,0> angle 21 //aperture .4 focal_point 0 //blur_samples 10 variance 0 } light_source{ <.75,2,-1.5>*100000,2.5 area_light x*150000, z*150000, 2, 2 jitter adaptive 1 } // This union will be called upon two // times: as an object and as a pigment: #declare shape= union{ box{<-4,0,-4>,<4,1,4>} box{<-3,1,3>,<3,4,4>} box{<-3,1,-4>,<3,4,-3>} box{<-4,1,-4>,<-3,4,4>} box{<3,1,-4>,<4,4,4>} box{<-3,4,3>,<3,4.3,3.4>} box{<-3,4,-3.4>,<3,4.3,-3>} box{<-3.4,4,-3.4>,<-3,4.3,3.4>} box{<3,4,-3.4>,<3.4,4.3,3.4>} cylinder{<4,2,0>,<4.25,2,0>,1.75} box{<4,1.5,-4>,<4.25,2.5,4>} } // Edge radius/ distance of effect: #declare p_range = 0.95; // Number of averaged samples // can be no higher than 255: #declare p_samples = 100; // The pigment-soon-to-be pigment_pattern: #declare edge= pigment{ average pigment_map{ #local V=0; #while(V*p_range*rv ] #local V=V+1; #end } } // This shows a basic example of the // pattern in use: object{shape texture{ pigment_pattern{edge} texture_map{ [.25 pigment{rgb .01} ] [.75 pigment{rgb 1} ] } } rotate y*35 } // The ground plane{y,-.1 pigment{ granite scale 1 frequency 2 color_map{ [0 rgb .23] [1 rgb<1 .9 .7>*.55] } } normal{ granite .3 scale 1 frequency 2 accuracy .001 } }