MATLAB Answers


Generating polygons from n random points in 2-D plane

Asked by Amit
on 21 Jul 2015
Latest activity Commented on by Amit
on 29 Oct 2015
Hello all: If I have n random points in a 2-D plane, what may be the approach to: (1) Count, (2) generate, the various possible n-point polygons (all available points should be the vertices).
Thanks immensely for your help.


Show 1 older comment
Dear John D'Errico: Thanks. So we have n! ways to order the points. I am now working on what may be the various easy 'eliminations'. Regards.
Is your only constraint that no pair of lines should cross? Do you care if the polygon is convex?
As you said, in each of n! combinations of vertices, you could come up with a cleverly efficient way to check if any lines cross.
Dear Kirby Fears, thanks for the comment. No I do not care if the polygon is convex. Thanks. Please let me know if you have any further insights. Regards, Amit

Sign in to comment.

0 Answers