> From: Gautam Jindal <[EMAIL PROTECTED]>
>
> I have a problem, I wanted to know how can I interpolate color while
> using a traingleArray geometry. If we use SHADE_GOURD it interpolates only
> to two end colors...what if i am interested in interpolating all the
> colors between these two end point colors. Please help.
If you specify a triangle with a red vertex and a white vertex you should see
the color smoothly interpolate from red to pink to white along the edge the
verticies share. Is that what you see?
I suspect you want "index color interpolation" where you define a color table
with colors associated with indices. In this mechanism you might define the
color table:
0 Red
1 Orange
2 Blue
3 White
A triangle with color 0 at one vertex and color 3 at the second vertex would
interpolate along the edge from red to orange to blue to white. This kind of
interpolation is sometimes used in visualization applications.
Java3D does not support index colors or index color interpolation. You might be
able to get the appearance you want by defining a texture map with your colors
in it and then using texture coordinates to specify the colors at each vertex.
Doug Gehringer
Sun Microsystems
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/