Re: Arrange points so polygon is not self intersecting
- From: Chip Eastham <hardmath@xxxxxxxxx>
- Date: Tue, 10 Jul 2007 00:17:10 -0000
On Jul 9, 7:01 pm, mek...@xxxxxxxxx wrote:
Hi all,
I was wondering if someone knows some sort of algorithm to find an
order for a set of points so that the polygon of those points is not
self-intersecting. Assume this is a 2-D plane with Euclidean geometry.
Thanks!
Dan
It's unclear what you mean by "find an order"
so that "the polygon of those points" is not
self-intersecting.
Perhaps you mean that the points themselves
are fixed in R^2, and you are free to impute
any cyclic ordering to produce a closed path
or polygon by connecting the points in that
order.
The convex hull of the points identifies which
of them are "outermost". You could start by
connecting these in the order determined by
that convex polygon. The remaining points
will lie in the convex closure of those outer
points.
As a general approach you can add these
remaining points one at a time provided that
at each step the unassigned points are not
in the exterior of the resulting polygon.
Any that fall on the boundary are happily
assigned a place in the ordering, but
there's a lot of flexibility in choosing
where the interior points are inserted
in the ordering.
If you aren't picky about the geometry,
I suppose a fairly expeditious approach
would be to recursively apply the convex
hull to all the remaining points, thereby
arranging them into a nested hierarchy.
A resulting proper polygon would typically
resemble a sort of circular labyrinth.
There are a variety of fast algorithms
for finding the convex hull of a set of
points in 2D, e.g.
http://softsurfer.com/Archive/algorithm_0109/algorithm_0109.htm
regards, chip
.
- Follow-Ups:
- References:
- Arrange points so polygon is not self intersecting
- From: mekmon
- Arrange points so polygon is not self intersecting
- Prev by Date: Re: "Schild's Ladder" by Greg Egan
- Next by Date: Relationships in phi time: mass/gravity, energy, and Fruit(x)
- Previous by thread: Re: Arrange points so polygon is not self intersecting
- Next by thread: Re: Arrange points so polygon is not self intersecting
- Index(es):
Relevant Pages
|
Loading