POV-Ray : Newsgroups : povray.general : pattern itterator : Re: pattern itterator Server Time
5 Jul 2024 10:36:02 EDT (-0400)
  Re: pattern itterator  
From: FractRacer
Date: 15 Dec 2014 18:27:45
Message: <548f6e71$1@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}}
>
>
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

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