Gerd Mueller wrote:

Hi,

I'm working on a molecule editor using Java3D. The application is
able to visualize iso surfaces which are calculated by a marching
cube algorithm. The result of this algorithm is a list of triangles.
So I'm using a simple TriangleArray to visualize them. The problem
is that the Gourand-shading can't work right since the triangles
are not connected. The iso surface looks as rendered with flat-shading.

My question: Is there any algorithm to convert a list of triangles in
to a triangle strip ?

Please look at utils jar - GeometryInfo + Stripifier class.


Your problem is not directly caused by using separate triangles as
opposed to triangle strip. Problem is that you assign normals for each
vertex computed only from triangle it belongs to. You should average the
value for all surrounding triangles. You can try to use NormalGenerator
with GeometryInfo.

Anyway, I suppose that with all info you have from previous computation
steps, you can do better job at preparing data yourself, without using
GeometryInfo.


Artur

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to