Results 1 to 4 of 4

Thread: Formula for Vertex Normals?

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    7

    Formula for Vertex Normals?

    Hi,

    So COLLADA files are made up of triangles. If a face normal is a 90 degree angle from the face of each triangle, how does one compute that value for each triangle in a COLLADA file. Does anyone know how to do it in Objective-C, if all of the mesh vertices (X, Y, Z values) are in an NSMutableArray?


  2. #2
    Junior Member
    Join Date
    Oct 2013
    Posts
    7
    To further specify, I have all the mesh vertices grouped together as (X, Y, Z) and they are stored in an NSMutableArray. The arrays can get quite large, sometimes over 2 million objects. It's still workable though and relatively fast.

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    7
    Also, I not doing this in a graphical context, I am more referring to a mathematical context. I feel like this is standard TRIGONOMETRY but again I may be wrong. I need an ANGLE, corresponding to a HORIZONTAL or VERTICAL value. So, if the part is laid down HORIZONTALLY, and a triangle is at a 38 degree angle, how would I know that if I only have an (X, Y, and Z value) representing a triangle in space?

    Example…


    if

    TRIANGLE VALUES = (X 3.5678543,Y 7.65432, Z 19.78965)

    then

    VERTEX NORMAL ANGLE = ???

  4. #4
    Junior Member
    Join Date
    Oct 2013
    Posts
    7
    Also, if someone wants to help me take a crack at it, here is a wiki…

    http://en.wikipedia.org/wiki/Normal_(geometry)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •