Results 1 to 5 of 5

Thread: drawing normals

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    drawing normals

    i'm making a polygon class that contains a variable number of coplanar vertices. i'd like to draw the normal to the plane that the polygon lies in. i have a plane class, consisting of A, B, C and D in the plane equation: Ax + By + Cz + D = 0. i know the normal to the plane is the directional vector (A, B, C). all need is two points on a line parallel to the normal to be able to draw it. any help?

    b

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    B.C., Canada
    Posts
    367

    Re: drawing normals

    Pick a point on the plane as one point and save it. Add the normal's directional vector to that point and save that point as well. Draw a line between those points. That's your normal vector

    j

  3. #3
    Senior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    174

    Re: drawing normals

    Hi J,
    I didn't understand what you said, in the last post, so can you be more clear ?

    Tnks
    Best regards
    Kurt

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: drawing normals

    thanks, j. that worked. as it turns out i was doing the right thing in the first place, but my plane class was generating faulty normals due to an error in my matrix class (whew!). i wanted to draw the normals so i could test my bsp class. thanks again.

    b

  5. #5
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Dunblane, Scotland
    Posts
    333

    Re: drawing normals

    I recently thought I would need this for my level editor and I decided I would calculate the center of the plane (each x,y and z component of every vertex averaged) then add on the normal. You can also multiply the noraml by a scalar say 2 and add it to make it look bigger if the planes are large (well I mean the polygons are large, the planes are infinite) I also thought that I could multiply the normal by a fraction of the polygons surface area so big important faces (an enviroment cube etc.) would have a big normal visible from a long way away but a tiny face would have an apropriately small normal.
    Reality is for idiots only the best over come it!

Similar Threads

  1. Drawing Normals as Lines
    By FrigginFrog in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-29-2011, 04:58 AM
  2. Drawing Normals for arcs
    By shadowfax in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-25-2010, 11:08 PM
  3. normals / drawing order
    By JHiemstra in forum COLLADA
    Replies: 2
    Last Post: 11-25-2008, 02:52 AM
  4. Replies: 6
    Last Post: 04-14-2004, 10:07 PM
  5. is it possible to have vertex normals or even face normals using triangle strips nt
    By wildeyedboyfromfreecloud in forum OpenGL: Advanced Coding
    Replies: 63
    Last Post: 03-19-2002, 11:42 PM

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