🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2191

Re: Sorting of x,y coords.

#2191
From: Ian D. Gay
Date: Fri, 02 Oct 1992 16:25
9 lines
837 bytes
prangba@halcyon.com (Bruce Prang) writes:

>Does anybody out there in net-land have any routines, or know where I
>can get some, for sorting x,y coordinate pairs. I want to sort these
>pairs so the resulting order is circular. That is, if you were to
>connect all of the points with straight lines none of these lines would
>cross.

Compute arctan(y/x) and use the result as your key.
Technical Details
Message-ID: <gay.718043106@sfu.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!news.u.washington.edu!uw-beaver!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!gay
References: <1992Oct1.224114.22519@nwnexus.WA.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!news.u.washington.edu!uw-beaver!cs.ubc.ca!newsserver.sfu.ca!sfu.ca!gay
From: gay@selkirk.sfu.ca (Ian D. Gay)
Newsgroups: comp.std.c
Subject: Re: Sorting of x,y coords.
Message-ID: <gay.718043106@sfu.ca>
Date: 2 Oct 92 16:25:06 GMT
Article-I.D.: sfu.gay.718043106
References: <1992Oct1.224114.22519@nwnexus.WA.COM>
Sender: news@sfu.ca
Organization: Simon Fraser University, Burnaby, B.C., Canada
Lines: 9