Results 1 to 8 of 8

Thread: Tesselation - rendering the contours of internal slices into a polygon

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    22

    Tesselation - rendering the contours of internal slices into a polygon

    I need help with Tesselation. I have several x y contours that each have an associated z coordinate. These coutours are made from the edge of an internal slice at the specified z-coordinate of the 3-D polygon I want to render, which could be concave. However, I belive that OpenGL needs a description of the faces of the object, instead of these "internal slice" contours. I haven't rendered my data yet, but I belive that the contour data would render as a series of 2-D polygons in stacked planes, instead of 1 3-D polygon. Am I right about this? How can I manipulate my contour data into data about the faces of this polygon, so that I can render it as a single 3-D object?

    Thanks,
    Jenny

  2. #2
    Member Contributor
    Join Date
    Feb 2002
    Location
    Wiesbaden, Germany
    Posts
    95

    Re: Tesselation - rendering the contours of internal slices into a polygon

    Hi,

    have a brief look at gluTesselate, I believe it is called so. This should do it, but is pretty simple to write an own solution for this problem. Just search for Tesselation on google. Or take a look at the other reply I posted to your most recent question.

    Regards,

    Martin

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    22

    Re: Tesselation - rendering the contours of internal slices into a polygon

    I have looked at tesselation, though I'm not sure that it is the full solution to my problem. Wont tesselation just render the inside of my xy contour? What I need to do is create a 3-d object by joining multiple contours.

    A web search has revelated that, since I have multiple xy contours of this object that are all parellel (made from internal slices of the object), I might need to "join" each adjacent xy contours by a sequence of triangle strips, to create a "ribbon" between each of the contours in order to render the full object. Key words are interpolation and triangulation. Is this the right direction?

    Does tesselation do this?

    Thanks,
    Jenny

  4. #4
    Member Contributor
    Join Date
    Feb 2002
    Location
    Wiesbaden, Germany
    Posts
    95

    Re: Tesselation - rendering the contours of internal slices into a polygon

    Hi,

    well, tesselation describes the fitting of triangles on a given surface or between points. So from this point of view it is definetly the right way to go.
    If I understand it right you have let's say a cylinder which is sliced e.g. 4 times. What you want to do is "reconstruct" the cylinder, right?
    Then tesselation will solve the problem.

    Greets,

    Martin

    P.S.: Where are you from?

  5. #5
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Holland
    Posts
    179

    Re: Tesselation - rendering the contours of internal slices into a polygon

    A web search has revelated that, since I have multiple xy contours of this object that are all parellel (made from internal slices of the object), I might need to "join" each adjacent xy contours by a sequence of triangle strips, to create a "ribbon" between each of the contours in order to render the full object. Key words are interpolation and triangulation. Is this the right direction?
    Yes.
    I can imagine this can lead to 'difficult' algorithms when trying to create a 'best fit' for the triangle-strips. I have no idea how to solve it, but it is definitely the right direction.

    Does tesselation do this?
    No.
    Tesselation will chop up a given (concave) polygon in multiple convex primitives. Tesselation does NOT join separate polygons together. In your case tesselation would result in multiple planar cross-sections of the original object.

    Good luck.

    Jean-Marc

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Tesselation - rendering the contours of internal slices into a polygon

    Provided that your contours have the same number of points and a consistent winding order of the vertices joining them with triangle strips should be simple. If they don't things get more complicated. If they do have these nice properties your code will turn out something like this:

    Code :
     
    glBegin(GL_TRIANGLE_STRIP);
        for(int i=0; i<numContours-1; i++){
            for(int j=0; i<numVertices; j++){
                glVertex3fv(contours[i].vertices[j];
                glVertex3fv(contours[i+1].vertices[j];
            }
        }
    glEnd();
    This doesn't supply normals, so you won't have lighting but thats easy enough to add.

  7. #7
    Junior Member Newbie
    Join Date
    Jul 2002
    Posts
    22

    Re: Tesselation - rendering the contours of internal slices into a polygon

    Unfortunately this is going to be a complicated reconstruction problem. There is no guarentee that the contours have the same number of points or even line up nicely, but I do think the contours will not be self intersecting. Anyone have any ideas for this more complicated case?

    Thanks,
    Jenny

    [This message has been edited by jenny (edited 07-22-2002).]

  8. #8
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    442

    Re: Tesselation - rendering the contours of internal slices into a polygon

    I would research GIS systems if I were you. There are tricky problems involved in reconstructing surfaces when, for example you have two contours or `peaks' which have to eventually join into a single contour.

    I seem to remember a paper in GEMS I about it.

Similar Threads

  1. Volume Rendering a Stack of 2D Slices
    By mmorgan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-22-2015, 03:36 PM
  2. Replies: 4
    Last Post: 08-30-2006, 09:30 PM
  3. slices in volume rendering
    By alark in forum OpenGL: Advanced Coding
    Replies: 16
    Last Post: 08-12-2003, 12:02 PM
  4. Polygon tesselation
    By sz in forum OpenGL: Advanced Coding
    Replies: 16
    Last Post: 04-16-2002, 07:55 PM
  5. Polygon tesselation with glu
    By turokretz in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 10-20-2000, 12:54 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