a normal to a surface is a vector that is perpendicular to it.  For a the
simple example of a plane, it comes out of the center and would point along
the y axis if the plane is in the x-z plane.  Hope this helps
Eric


> 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".
>

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