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

Thread: surface Rendering

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    2

    surface Rendering

    I am trying to write code to generate a mesh around a surface defined by
    several irregular planes. Can I use glEvalMesh for the same to generate the surface part by part. Kindly let me know if anyone has the solution for the same.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Computer Graphics Group, RWTH Aachen, Germany
    Posts
    137

    Re: surface Rendering

    can you be more specific and explain "a surface defined by
    several irregular planes" and the terms "irregular planes" and "around"?

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    2

    Re: surface Rendering

    The Surface that I am trying to render is not a regular geometric surface.I have hand drawn 2d contours on several z-planes. I need to render the surface with regards to these contours to view the entire shape (irregular) in 3D. The surface rendered is to be represented by a mesh.

  4. #4
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Computer Graphics Group, RWTH Aachen, Germany
    Posts
    137

    Re: surface Rendering

    Hi
    What I may suggest you is the following technique :
    it asserts that your contours don't have self interesections
    every contour is planar
    the contours' planes are parallel (here parallel also to Oxy, which is not necessary)
    The planes are sorted in z - order
    So:
    for every two successive planes make the mesh so:

    1. create a mapping between your 2d contours - one way to do this is :
    for every angle fi (fi in [0:2*pi], choose step s) find the intersection point of a line L in the first plane (incident with the origin of the local plane coordinate system, Angle(L, Ox) = fi) with the contour in the first plane
    Do the same in the second plane.
    Lets say the intersection points' pair are (Fk, Sk) ( for every angle fi)
    (Fk in the first plane, Sk in the second)
    So after that you will have a map between the two contours.

    2. Draw the lines (Fk, Sk) for every fi . for every t (t in [0;1] , choose step s) take the plane parallel to Oxy
    with Z = Zt = Zf + t(Zs - Zf) (where Zs, Zf are Z koordinates of the second and the first plane). Find the intersection points Pk of the plane and the segment (Fk, Sk) for every k - draw the strip contour {Pk} . Now you have a something like "contour morphing" ) in the plane with Z = Zt;

    repeat this until the last plane...

    So - I have never tested or implemented the algorithm - It's only a suggestion. Try it at own risk Maybe it'll produce very "ugly" results,who knows . It's a product only of my experience with surface tessellation and geometrics.

    Hope this helps
    Martin

Posting Permissions

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