|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> Lars Rohwedder <rok### [at] gmx de> wrote:
>...
> > So I had expected that a formula like 0.9 - mandel would give the
>
> > What went wrong here?
>
> Part of what's going wrong is that mandel is a POV-Ray pattern that has a built
> in color map. And that wreaks hell with everything right from the beginning.
>
> I'd say try using:
>
> #declare Mandel = function { pigment {mandel 1000 exterior 1, 1 color_map {[0
> rgb 0] [1 rgb 1]}}}
>...
Hi Bill and Lars
AFAIK, patterns can not have built in color maps, while pigments can.
So here I would rater suggest a pattern function instead of a pigment function:
#declare MandelbrotFn =
function {
pattern {
mandel 1000
exterior 1, 1
}
}
;
Pattern functions do not return colors as pigment functions do, but float values
between 0 and 1.
Patterns and pattern functions (and other functions returning floats) can be
used to select colors from color maps in pigments, e.g. like this:
plane {
+z, 0
pigment {
mandel 1000
color_map {
[ 0.0 color rgb <0, 0, 0> ]
[ 0.2 color rgb <1, 0, 0> ]
[ 0.4 color rgb <1, 1, 0> ]
[ 1.0 color rgb <1, 1, 1> ]
[ 1.0 color rgb <0, 0, 0> ]
}
}
}
- or like this:
#declare MandelFn = function { pattern { mandel 1000 } };
plane {
+z, 0
pigment {
function { MandelFn(x, y, z) }
color_map {
[ 0.0 color rgb <0, 0, 0> ]
[ 0.2 color rgb <1, 0, 0> ]
[ 0.4 color rgb <1, 1, 0> ]
[ 1.0 color rgb <1, 1, 1> ]
[ 1.0 color rgb <0, 0, 0> ]
}
}
}
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
|
 |