|  |  | kurtz le pirate <kur### [at] gmail com> wrote:
> The ideal solution (for me) would be :
> pigment {
>  onion
>  color_map { ... }
>  myWaveTypeFn // for the wave
>  }
>
> myWaveTypeFn same as standard cubic_wave, poly_wave, ...
I think this might work:
Take onion, and make it
#declare Onion = function {pigment {onion}}
Now define a user-defined wave function to apply to the domain of the original
pigment function
#declare Wave = function {sin (Onion (x, y, z)*tau)}
 pigment {
  Onion
  color_map { ... }
  // and now the wave function is already built into the pigment pattern
  }
You just need to use the 0-1 values returned by your pigment pattern as the
input for your wave function.
If you're going to be using a pigment pattern that POV-Ray assigns an in-built
color_map to, then you need to override that in your original pigment function
with a user-defined color map going from black (1) to white (1).
#declare Onion = function {pigment {onion} color_map {[0 rgb 0] [1 rgb 1]}}
- BW Post a reply to this message
 |  |