Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: OpenGL representation of a plane

  1. #1
    Intern Newbie
    Join Date
    Jul 2003
    Posts
    42

    OpenGL representation of a plane

    How would one render a representation of a plane, with the standard equation ax+by+cz+d=0, knowing say, just that plane and a general idea of the size of the quadrelateral that is to represent it, as in it's length and width?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Oct 2002
    Location
    King George, Virginia
    Posts
    132

    Re: OpenGL representation of a plane

    find 4 points that satisfy the plane equation and use them to draw a quadrilateral. that may actually be kind of hard to do.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    807

    Re: OpenGL representation of a plane

    Find the largest component of the plane's normal. This tells you which of the "main" planes (XY, XZ or YZ) the plane is closest to. Let's say that Z is the normal's largest component. This means the plane is most closely aligned to the XY plane.

    Given this knowledge, you can generate four points in the XY plane to form a square. Then fill in the four Z components of these points by filling in X and Y in the plane equation.

    -- Tom

Posting Permissions

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