Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: normal vector to a plane

  1. #1
    Junior Member Newbie
    Join Date
    May 2008

    normal vector to a plane

    If I have 3 points on a plane in 3D Space,
    P(x1, y1, z1)
    P(x2, y2, z2)
    P(x3, y3, z3)

    Is there any function which takes the parameter as the co-ordinate of the 3 points and returns the x, y , z component of vector perpendicular to the plane?

  2. #2
    Junior Member Regular Contributor PaladinOfKaos's Avatar
    Join Date
    Aug 2005

    Re: normal vector to a plane

    Three points is a triangle, and it's very easy to find the normal of one of those.

    cross(P3-P1, P2-P1)
    cross(P2-P1, P3-P1)

    Those will calculate normals pointing in opposite directions.
    The unofficial community-lead OpenGL SDK is in development!

Posting Permissions

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