Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Constructing a mesh from points (https://www.askmehelpdesk.com/showthread.php?t=19370)

  • Feb 1, 2006, 05:57 AM
    lhhai
    Constructing a mesh from points
    Hi all,
    This is my problem:
    I have a set of point (x,y,z). They represents a surface.
    Now I want to use TriangleList to render them, so the problem is to find out which triple of point forms a Triangle. Is there any algorithm for that or any suggestion about keyword so that I can search them from Google.

    Thank in advance
    Hoang Hai
  • Feb 1, 2006, 10:18 AM
    LTheobald
    I think this question may be a little too specialised for us to answer. Can I ask what "TriangleList" is?
  • Feb 1, 2006, 08:15 PM
    lhhai
    TriangleList is just a list of triangle (but this term is common for those who works with DirectX, OpenGL or Java3D). However, my problem is not connected with any specific technology, it's just an algorithm problem.
    We have a list of point and I want to connect each 3 points to form triangle. These triangle are connected (the have shared edged) and they form a mesh.
    The problem is to choose which points are good to form a triangle.

    If you have any suggestion about forums that is more approriate, I appreciate your ideas. Please tell me.

    Thanks for your answer.
  • Feb 1, 2006, 10:19 PM
    Ademan
    Well, I hate to tell you, but you're out of luck, unless you can make some assumptions. First of all, the definition of a triangle is "a convex polygon with three segments joining three non-collinear points. Each of the three segments is called a side, and each of the three non-collinear points is called a vertex." ( GoMath.com)

    So in reality, if you have a bunch of points, any 3 points creates a triangle. However, since you're talking about a mesh, it is POSSIBLE that you could do this, but ONLY if it's a convex shape (Convex)

    I suppose it'd be POSSIBLE to extract all the INTENDED triangles out of the mesh, however, if it's a non convex mesh, there is absolutely no way.

    Where are you getting these points? Are you sure you can't get the triangle data too? Most model formats (in fact all I can think of) provide triangle indices.

    Hope that helps
    -Dan
  • Nov 20, 2007, 09:43 AM
    red_cartoon
    Use Delaunay triangulation algorithm

  • All times are GMT -7. The time now is 12:29 AM.