Re: finding cluster boundary [message #79244] |
Wed, 08 February 2012 18:23 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
biophys writes:
> What is the most efficient way of finding the matching triangle from
> Triangles that contains the edge to be removed? i.e. if
> Distance(B[i],B[i+1]) > threshold, the immediate detouring point will
> be in the matching triangle [B[i], B[i+1], Detour]. This process will
> go iteratively until all boundary edges are shorter than the
> threshold. I don't know how the indices are organized in the output
> from TRIANGULATE. Is there a faster way than looping through all
> indices to find the matching triangle? Preferably an "IDL way" would
> be cool. :)
I think this is something MESH_DECIMATE might do.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: finding cluster boundary [message #79245 is a reply to message #79244] |
Wed, 08 February 2012 16:39  |
biophys
Messages: 68 Registered: July 2004
|
Member |
|
|
Thanks, Ken. You are right. I was thinking of setting a threshold, if
the edge is bigger in length than the threshold we remove the edge and
detour to an interior point. However, I am not sure if this is the
best way to do it. If I wanted to do it this way, now the question is
given a set of triangles and boundary B returned by TRIANGULATE,
IDL>TRIANGULATE, X, Y, Triangles, B
What is the most efficient way of finding the matching triangle from
Triangles that contains the edge to be removed? i.e. if
Distance(B[i],B[i+1]) > threshold, the immediate detouring point will
be in the matching triangle [B[i], B[i+1], Detour]. This process will
go iteratively until all boundary edges are shorter than the
threshold. I don't know how the indices are organized in the output
from TRIANGULATE. Is there a faster way than looping through all
indices to find the matching triangle? Preferably an "IDL way" would
be cool. :)
Cheers,
BP
>
> I don't think there is a unique definition of the 'boundary points'
> in the way you are asking. How do you decide whether the boundary
> should detour to an interior point or not?
>
> Ken Bowman
|
|
|
Re: finding cluster boundary [message #79246 is a reply to message #79245] |
Wed, 08 February 2012 15:51  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article <a3d4e3c3-b379-48fb-aea9-e98ed9af35e5@n8g2000pbc.googlegroups.com>,
biophys <biophys@gmail.com> wrote:
> Hi, Folks
>
> I've got a collection of 2D points that have already been identified
> as a cluster. Is there a quick way to extract the boundary points of
> the cluster? I understand the easiest way is to use TRIANGULATE
> procedure to get the boundary points in counterclockwise order.
> However, the points returned are like a convex envelope of the cluster
> which does not represent the real shape of the cluster. It looks like
> that I might need to specify that the edge of the boundary polygon can
> not be larger than a certain length. Any suggestions?
I don't think there is a unique definition of the 'boundary points'
in the way you are asking. How do you decide whether the boundary
should detour to an interior point or not?
Ken Bowman
|
|
|