Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: POLY2CW  ???  what happened to it?
Date: Tue, 13 Nov 2007 10:09:24 -0500
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <fhcen4$f8u$1@fred.mathworks.com>
References: <fh8m9n$hcb$1@fred.mathworks.com> <fh8n8i$s4v$1@fred.mathworks.com> <fh8q0r$pqi$1@fred.mathworks.com> <fh9mea$p6r$1@fred.mathworks.com> <fhap1k$1fl$1@fred.mathworks.com>
NNTP-Posting-Host: eddinss-lt.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1194966564 15646 172.31.57.98 (13 Nov 2007 15:09:24 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 13 Nov 2007 15:09:24 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <HIDDEN>
Xref: news.mathworks.com comp.soft-sys.matlab:437305



Paul wrote:

>> It is correct.  If you plot the polygon with lines between
> the vertices, 
>> like this:
>>
>> plot(xv,yv,'r')
>>
>> you'll see that your polygon is self-intersecting in a
> kind of hourglass 
>> shape.  That explains your result.
>>
>> -- 
>> Steve Eddins
>> http://blogs.mathworks.com/steve
> 
> This is EXACTLY why I was asking about POLY2CW routine.  I
> have to make the vertices of the polygon ordered clockwise.
> 

I'm not sure that POLY2CW, which is in the Mapping Toolbox as Steve Lord 
said earlier, will help you.  POLY2CW does not reorder the vertices of a 
self-intersecting polygon to make it non self-intersecting.

-- 
Steve Eddins
http://blogs.mathworks.com/steve