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 2 of 2

Thread: Generating a surface from a grid

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2004
    Location
    Israel
    Posts
    1

    Generating a surface from a grid

    Hello,

    I'm working on application that draws lenses on the screen. I have sample points from each lens, which are ordered on X-Y grid, and each sample has a Z value that describes the height of the lens at that X-Y point on the grid.

    Now, I want to plot the surface of the lens on the screen, using OpenGL.
    Since I'm new in the OpenGL world, I have two questions:

    1. Does OpenGL has tools to triangulate my sample points to a nice polygoned-mesh? If it doesn't, do you know some references to perform this task?

    2. Is it possible to plot the surface in OpenGL, directly using the sample points, without triangulating them to polygons (please note that they are ordered on X-Y grid)?

    Thanks in advance

  2. #2
    Intern Contributor
    Join Date
    Sep 2003
    Location
    Jersey, Channel Islands
    Posts
    68

    Re: Generating a surface from a grid

    http://research.microsoft.com/~hoppe/#thesis

    has a paper (actually thesis) on surface reconstruction from points. This is actually a link suggested in a previous post in this forum, not so long ago with the - not-so-revealing title Algorithm. I haven't gone thru the paper in detail myself, but it might be a good start.

    From an OpenGL point of view, I see 3 options for you.
    1. Create triangles yourself using your points, and render these triangles. You will need code to do the triangulation, and possibly, lots of stuff from this guy's paper and further reading.

    2. Approximate your lens using quadrics (via glu quadrics). This could work for quite a few simple lens. You have to write code to find out the type of quadrics and their position/orientation.

    3. Approximate the lens using OpenGL nurbs. You have to write code to create the nurbs surface that goes through your points.

    madmortigan

Posting Permissions

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