POV-Ray : Newsgroups : povray.general : pattern itterator : Re: pattern itterator Server Time
5 Jul 2024 09:59:10 EDT (-0400)
  Re: pattern itterator  
From: ricky312
Date: 15 Dec 2014 16:25:00
Message: <web.548f510786288af69fa53fe60@news.povray.org>
Here's my average iterator it seems to work okay but it has arbitrary values and
has issues.

#macro iterator(pigment_function_booleon,Function,Octaves,Omega,rough)

pigment{average pigment_map{
#for(i,.1,Octaves,1)
   #if(pigment_function_booleon)
[pow(.5(i*rough)) function{Function(x,y,z).grey}scale 1/(i*(Omega)) ]
    #else
[pow(1,(i*rough)) function{Function(x,y,z)}scale pow(i,Omega)  translate
i*Omega]
#end
#end
}}#end
#declare no_wrap=function(x) {max(min(x,1),0)}

camera{location<0,0,-5>
look_at 0}
 #declare ridge=function{pigment{bozo scale .1 triangle_wave  color_map{[0 rgb
0][1 rgb 1]}}}
 #declare ridged=function{iterator(yes,ridge,6,.6,3) }

plane{z,0
pigment{function{no_wrap(ridged(x,y,z).grey)-.1}color_map{[0 rgb 0][1 rgb
1]}}finish{emission 1}}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.