|
![](/i/fill.gif) |
> Hello,
>
> I'm trying to produce the colors of the rainbow inside a #while loop, but to no
> avail so far. I need them to progress from red to violet, and I am using the
> CHSV2RGB for the conversion, which I thought would make things easier. Still,
> all I get is a constant red color in my blob.
>
>
> Ruy (an extremely absent POVer since 1994, version 2.2)
>
>
The hue is given in degree. In your sample, it goes from 0 degree to 1
degree, giving an almost imperceptible change in coloration.
Change your code to:
#local Hue = (Mx-Cr)/Mx*360;
// Scale to a full circle on the colour wheel
// Adjust if you want to use a smaller or larger range
texture {
pigment{rgb CHSV2RGB(<Hue, 1.0, 1.0>)}
}
OR change your pigment to:
pigment{rgb CHSV2RGB(<((Mx-Cr)/Mx)*360, 1.0, 1.0>)}
Alain
Post a reply to this message
|
![](/i/fill.gif) |