Results 1 to 7 of 7

Thread: calculating normals of quads

  1. #1
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    256

    calculating normals of quads

    i know how to calculate normals for triangles, but how can I do this for quads? Any one an idea?

    Diapolo

  2. #2
    Member Contributor
    Join Date
    Feb 2000
    Location
    Breda, Netherlands
    Posts
    57

    Re: calculating normals of quads

    Exactly the same way.
    Just use the first 3 points to calulate the normal from, and you're all set.

    John

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    Madrid, Spain
    Posts
    2

    Re: calculating normals of quads

    Only if the four vertices of the quad lie on the same plane you can use any 3 of the 4 points.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    256

    Re: calculating normals of quads

    How can I calculate them, if they are not on one plane?

  5. #5
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: calculating normals of quads

    if the quad is not a plane, but it should be a single surface the same, then it is better known as a "patch": something like curved surfaces.
    for a patch, there's not a unique normal.

    but if the quad has to be considered not to be curved, you have to split it in two triangles:

    Code :
     
    A        B
     +------+ 
     |\     |
     | \    |
     |  \   |
     |   \  |
     |    \ |
     |     \|
     +------+
    C        D
    then, you'll have two planar surfaces, hence two normals for that quad.

    first, calculate the normal for triangle ADB, then for triangle ACD.

    Dolo/\/\ightY

    [This message has been edited by dmy (edited 03-24-2000).]
    Dolo/\/\ightY

  6. #6
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    256

    Re: calculating normals of quads

    One other question, is it better to use triangles instead of quads? Any difference in speed (which one is better to handle by the graphic chip)?

    Diapolo

  7. #7
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Lawrence, KS USA
    Posts
    6

    Re: calculating normals of quads

    I think it's better to send triangles to OpenGL, because I think all poly's get converted to triangles anyway before they are sent to the card. (Someone correct me if I'm wrong). Also, with triangles you a) never have to worry about non-coplanar polys, which don't render correctly, and b) avoid some weird OpenGL clipping/lighting artifacts that sometimes happen when you use quads.

    Also, you can use triangle strips and fans, which are fast

Similar Threads

  1. Normals (Quads)
    By lordbittmann in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-19-2013, 06:56 AM
  2. Calculating normals.
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-05-2004, 11:24 PM
  3. Calculating normals
    By Vlasko in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-01-2003, 12:46 PM
  4. Calculating Normals?
    By hooded paladin in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 11-12-2001, 11:33 PM
  5. Calculating Normals
    By Zadkiel in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-06-2000, 08:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean