X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05 Dec 2013 02:32 PM by  anon
Triangulate function
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
05 Dec 2013 02:32 PM
    Hello I am using the triangulate function to get tr variable from xy points. Trinagulate, x, y, tr I would like to know for a point X1 and Y1, how to know speedly the tr id which contain this point... (What is the id of tr which contains point X1, Y1) Thanks a lot aurelien boulben

    Deleted User



    New Member


    Posts:
    New Member


    --
    05 Dec 2013 04:11 PM
    Hi Aurelien, I'm not sure if I understand, isn't the information of what you get from TR in the IDL help, here: http://www.exelisvis.com/docs/TRIANGU... Triangles A named variable that, on exit, contains the list of triangles in the Delaunay triangulation of the points specified by the X and Y arguments. Triangles is a longword array dimensioned (3, number of triangles), where Triangles[0, i],Triangles[1, i], and Triangles[2, i] contain the indices of the vertices of the i-th triangle (i.e., X[Tr[*, i]]and Y[Triangles[*, i]] are the X and Y coordinates of the vertices of the i-th triangle). Are you looking for something else? Cheers, Fernando

    Deleted User



    New Member


    Posts:
    New Member


    --
    06 Dec 2013 06:08 AM
    Hi Fernando Thank for your answer My request was not very clear... I understand well the triangulate function and the Tr variable with relations beetween points and triangles... What i want to know is : I have a group of points, X and Y I build triangulation : Triangulate, X, Y, Tr For a specific coordinate X1 Y1 (Not a point from the initial triangulation), I would like to determine the ID of the triangle which contains the X1, Y1 point... What the ID of Tr Variable for the triangle which contain the X1, Y1 point... Thanks a lot Aurelien

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 Dec 2013 06:00 PM
    Hi Aurelien, I think that you will need to calculate by yourself where those pairs (X1, Y1) fall in the surface and then see which one is the triangle that covers that part of the surface. In other words, there isn't a straight IDL function that will tell you what is the triangle where those pairs of points fall. Fernando

    Deleted User



    New Member


    Posts:
    New Member


    --
    20 Dec 2013 09:56 AM
    You could use something like the IDL Coyote Library routine Inside, to loop through your triangles and tell you which one contained the point in question. To make this fast, however, you probably want to screen your list of triangles to those that are reasonably close to the point in question. There is no point querying a triangle that is far away from the point you are concerned about.
    You are not authorized to post a reply.