|
 |
kurtz le pirate <kur### [at] gmail com> wrote:
> Hello
>
> Is it possible to customize "wave_form" in color patterns ?
> Thanks
Well, ... yes, but as far as I know, you can only do it in the TOK / Bald Eagle
over-complicated "write the whole thing yourself from scratch" method.
You know that you can use a function to define a pigment pattern,
pigment {function {}}
and that you can have POV-Ray convert any inbuilt pigment pattern into a
function.
function {pigment {}}
So what you do, is you take your pattern, convert it into a function, and then
use a user-defined function to modulate that 0-1 range according to the
wave_type that you implement in your function.
#declare f_Pattern = function {pigment {}}
#declare f_Wave = function {my_wave_type}
#declare WavePattern = function {f_Pattern * f_Wave}
Then you make a texture using the "average" pattern, and use the product of your
pattern function and wave function to control the rgbft values in the average
texture.
#declare WaveModifiedPigment =
texture {
pigment {
average
pigment_map {
[
function { WavePattern (x, y, z).red }
color_map {
[ 0 red 0 ]
[ 1 red 5 ]
}
... etc
}
Depending upon your exact needs, you _might_ need to create a special cumulative
distribution function (cdf) using a spline, and then employ importance sampling
by writing a probability density function (pdf) to return your color_map value
from the cdf for any given pattern value. And THAt will be your actual f_Wave
function that you use in the average texture.
Hope that "helps".
- Bill
Post a reply to this message
|
 |