|
![](/i/fill.gif) |
In article <3eda6530@news.povray.org>,
"Andrew Coppin" <orp### [at] btinternet com> wrote:
> What I want is for all points where y >= +100 to be red, all points where y
> <= -100 to be blue, and the points inbetween to be linearly interpolated. I
> can get red -> blue -> red, and I can get blue -> red -> blue, but how do I
> get red -> blue?
You could use the object pattern with a plane to remove the undesired
portion. Something like:
pigment {
object {plane {y, 0}
pigment {color Red},
pigment {planar
color_map {[0 color Blue] [1 color Red]}
}
}
}
I've been thinking of a generalization of the waveform feature that
would make this a lot easier, it would be done with a gradient pattern
and a clamp waveform.
You could also do it with a simple function pattern:
#include "math.inc"
pigment {function {clip(y, 0, 1)}
color_map {[0 color Red] [1 color Blue]}
}
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |