|
|
I though some (other) beginners might find this useful -
I had quite a job figuring out from the documentation how this would be
done. Ultimately I only managed it by referring to a previous post that
showed how to add two pigments together in RGBt space.
--8<--8<--
//
// Unit RGB cube, centered on the origin.
//
#declare rgbcube =
box {
0, 0.5
pigment {
average
pigment_map {
[ gradient x triangle_wave color_map { [0 color 0 ] [1 color rgb <3,
0, 0> ] } ]
[ gradient y triangle_wave color_map { [0 color 0 ] [1 color rgb <0,
3, 0> ] } ]
[ gradient z triangle_wave color_map { [0 color 0 ] [1 color rgb <0,
0, 3> ] } ]
}
}
translate -0.25
scale 2
}
--8<--8<--
Ray
Post a reply to this message
|
|
|
|
Since posting that this morning I've found a very similar object from
Christopher Huff in his message "Re: Color Cube - colorcube.jpg (1/1)" on
02/17/2004 in p.b.i.
One significant difference is that he's had to shrink his cube slightly
because of the speckles and other errors caused by the discontinuities in
the ramp wave for values 0 and 1.
I had the same problems too, at first, and my original solution was the same
as Christopher's.
However in this version I avoided it by only using the first half of a
triangle wave which doesn't have discontinuities, and so this cube is
exactly 1 unit in each dimension.
Ray
Post a reply to this message
|
|