comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » sort points clockwise or clounterclockwise
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: sort points clockwise or clounterclockwise [message #91162 is a reply to message #91158] Tue, 09 June 2015 13:11 Go to previous message
junsix is currently offline  junsix
Messages: 3
Registered: June 2015
Junior Member
On Tuesday, June 9, 2015 at 11:19:54 AM UTC-5, Craig Markwardt wrote:
> On Monday, June 8, 2015 at 4:32:53 PM UTC-4, junum wrote:
>> Hi,
>>
>> I am trying to order points of closed polygon in clockwise or counterclockwise.
>> Here is a octagon and I tried to use Triangulate that I searched.
>
>
> I would never have thought to use TRIANGULATE to order items.
>
> Why not use ATAN(Y,X) which gives the angle. Your points are not centered on the origin. But that is easy enough, your circle is centered on (2.5,2.5)
>
> ANGLE = ATAN(Y-2.5,X-2.5)
>
> Now sort on ANGLE.

That is the solution.
Thank you very much for help!

Jun
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: buggy dictionary
Next Topic: Experience with ENVIRasterSeries?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:28:34 PDT 2025

Total time taken to generate the page: 0.00242 seconds