Hi Detlef,
> I'm trying to Display RGB values in a Color Cube like in Example P4_09, with
> the
> difference that i already have the RGB Values in a 3 dimensional array.
> (e.g [255,255,0] should map to yellow and should be displayed as 255,255,0).
>
> I looked at also at the other examples, but couldn't find a good way to
> achieve
> this.
>
> Thanks for any hint.
P4_09.java constructs a FlatField with MathType:
((red, green, blue) -> RGB_VALUE)
and ScalarMaps:
red -> XAxis
green -> YAxis
blue -> ZAxis
red -> Red
green -> Green
blue -> Blue
What you probably want is a FlatField with MathType
something like:
((x, y, z) -> (red, green, blue))
and ScalarMaps:
x -> XAxis
y -> YAxis
z -> ZAxis
red -> Red
green -> Green
blue -> Blue
For each of your ScalarMaps to Red, Green and Blue, call
setRange(0.0, 255.0) - this will map 0.0 to 0.0 and 255.0
to 1.0 (in VisAD/Java3D colors, 1.0 is full on and the same
as what you mean by 255).
Good luck,
Bill