revcc
revcc

Reputation: 23

Find biggest possible polygon of group of points

How to find the biggest possible polygon of a group of points?

E.g. the following points are given:

0 | 3
4 | 0
1 | 1
0 | 0

-> Use the 1st, 2nd and 4th point to build a polygon (3rd point is useless)

Upvotes: 2

Views: 1313

Answers (1)

Dr. belisarius
Dr. belisarius

Reputation: 61016

What you seems to be looking for is the Convex Hull.

Example:

enter image description here

The Gift Wrapping Algorithm is the easiest way to calculate the Convex Hull, but it isn't optimal.

Chan's algorithm is probably the simplest optimal algorithm.

HTH!

Upvotes: 3

Related Questions