|
![](/i/fill.gif) |
> 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}}
>
>
Well done, you have made a good and useful macro, I play with it and
some others pigments.
--
Lionel
<b>Do not judge my words, judge my actions.</b>
---
http://www.avast.com
Post a reply to this message
|
![](/i/fill.gif) |