Path: news.mathworks.com!not-for-mail
From: "Luigi Giaccari" <giaccariluigi@msn.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Polygon from Unordered set of points
Date: Mon, 1 Jun 2009 16:50:19 +0000 (UTC)
Organization: L'aquila
Lines: 27
Message-ID: <h010sa$6ca$1@fred.mathworks.com>
References: <gvvg1t$p64$1@fred.mathworks.com>
Reply-To: "Luigi Giaccari" <giaccariluigi@msn.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1243875019 6538 172.30.248.35 (1 Jun 2009 16:50:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Jun 2009 16:50:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1548775
Xref: news.mathworks.com comp.soft-sys.matlab:543994


"Balwinder Singh" <balwindersingh@gmail.com> wrote in message <gvvg1t$p64$1@fred.mathworks.com>...
> Hi All,
> I have an unordered set of points (x,y). I want to form a polygon from these vertices which should arrange the points in either clockwise or anticlockwise sense. Is it possible to do in MATLAB?
> 
> Thanks.

The solution to this problem heavly depends on the shape of your dataset.
ONe solution may be the traveling salesman. For convex shape is the convex hull.

I thing in the general case you have to find delaunay edges.

For more see:


   doc
         demos
                  Mathematics
                                     Creating and editing delaunay triangulation
                                          Example 7(Example Seven: Curve Reconstruction     from a Point Cloud)




http://giaccariluigi.altervista.org/blog/