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: 2d triangle-mesh optimization

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2002
    Location
    kremnica, slovakia, europe, earth, sol :-)
    Posts
    102

    2d triangle-mesh optimization

    i've got a plenty of 2d-triangles (non-overlapping, together filling possibly non-convex and non-continuos 2d-area). i need to reduce their number. the area must remain exactly same. is there any lovely alghoritm for this ? (often i have 20 tris for a simple square and that's a bit stupid i think )

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: 2d triangle-mesh optimization

    It doesn't sound too hard to me :

    1) find the vertices and edges that are on the contour (check if an edge is shared by to triangles : not the silhouette)

    2) for each polygon found in 1), split it in several convex polygons (angle between 2 successive edges must be positive for ex)

    3) rebuild triangles for each convex polygon, from each contour edge and the first vertex.

    Only 2) seem a bit tricky to me. But I do not have to implement this, so it's much easier

    Good luck !

Posting Permissions

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