At 19:50 08/06/99 +0100, you wrote:
>Hi again,
>
>I think you are all probably getting a bit bored, but please bare with
>me.  I have got this little program working, the thing is i seem to have
>gained a triangle that i did not explicitly define myself.  How does
>java3d do this, is there some way of stoppong - arranging the vertices
>differently maybe ?
>
>The code is attatched - the getPlane methode generates the
>TriangleStripArray and all it's geometry.
>
>Thanks for the help
>
>Dave
>
 If you look at the specs for the triangle strip array Dave, the shapes are
generated like this:

  First three coordinates --> triangle 1
  Second to fourth coords --> triangle 2
  Third to fifth coords   --> triangle 3 etc

so you should be getting 10 triangles from 12 coordinates.  In fact some of
yours are degenerate (ie two corners are the same giving a line) which
means you dont see all 10, so 

  coords[0] = new Point3f( 0.0f,0.0f,0.0f);
  coords[1] = new Point3f( 1.0f,0.0f,-0.5f);
  coords[2] = new Point3f( 1.0f,0.5f,0.0f);  triangle 1

  coords[1] = new Point3f( 1.0f,0.0f,-0.5f);
  coords[2] = new Point3f( 1.0f,0.5f,0.0f);  
  coords[3]=new Point3f( 1.0f,0.5f,0.0f);    triangle 2, but 2 corners the
same, so a line

  coords[2] = new Point3f( 1.0f,0.5f,0.0f);  
  coords[3]=new Point3f( 1.0f,0.5f,0.0f);
  coords[4]=new Point3f( 0.0f,1.0f,0.0f);    triangle 3, but 2 corners the
same, so a line

and so on.

Hope this helps.

Tony


=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to