What exactly are Normals? (I know there used to calculate which face gets
lighting)
And How do I define normals for example for the following TriangleArray:

 private static final float[] verts =
 {
  -1.0f, 0.0f, 0.0f,
  1.0f, 0.0f, 0.0f,
  0.0f, 1.0f, 0.5f,

  -1.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 1.0f,
  0.0f, 1.0f, 0.5f,

  1.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 1.0f,
  0.0f, 1.0f, 0.5f,

  -1.0f, 0.0f, 0.0f,
  1.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 1.0f,
 };

(this is a shape that has four faces and makes up something like a pyramid)
I just copy and pasted the above verts into the normal array to see what
happened and it didnt exactly work:

 private static final float[] normals =
 {
  -1.0f, 0.0f, 0.0f,
  1.0f, 0.0f, 0.0f,
  0.0f, 1.0f, 0.5f,

  -1.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 1.0f,
  0.0f, 1.0f, 0.5f,

  1.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 1.0f,
  0.0f, 1.0f, 0.5f,

  -1.0f, 0.0f, 0.0f,
  1.0f, 0.0f, 0.0f,
  0.0f, 0.0f, 1.0f,
 };

I then created the shape with the following code:

  Tarray = new TriangleArray(12, TriangleArray.COLOR_3 |
TriangleArray.COORDINATES | TriangleArray.NORMALS);
  Tarray.setCoordinates(0, verts);
  Tarray.setNormals(0, normals);
  app = new Appearance();
  mat = new Material(aColor, eColor, dColor, sColor, shinyness);
  app.setMaterial(mat);
  shp = new Shape3D(Tarray, app);


Thank you

Thomas M Clarke

===========================================================================
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