Click here to Skip to main content
15,887,434 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Ordering (Poly) Lines Pin
Alan Balkany16-Feb-12 4:03
Alan Balkany16-Feb-12 4:03 
QuestionCan you do this with a convex hull? Pin
Kyudos12-Feb-12 12:40
Kyudos12-Feb-12 12:40 
AnswerRe: Can you do this with a convex hull? Pin
Kyudos12-Feb-12 14:13
Kyudos12-Feb-12 14:13 
AnswerRe: Can you do this with a convex hull? Pin
BobJanova12-Feb-12 23:03
BobJanova12-Feb-12 23:03 
GeneralRe: Can you do this with a convex hull? Pin
Kyudos13-Feb-12 12:57
Kyudos13-Feb-12 12:57 
GeneralRe: Can you do this with a convex hull? Pin
BobJanova16-Feb-12 5:22
BobJanova16-Feb-12 5:22 
GeneralRe: Can you do this with a convex hull? Pin
Kyudos16-Feb-12 9:50
Kyudos16-Feb-12 9:50 
AnswerRe: Can you do this with a convex hull? Pin
Luc Pattyn16-Feb-12 10:56
sitebuilderLuc Pattyn16-Feb-12 10:56 
Kyudos wrote:
I think throwing the points at a Travelling Salesman algorithm might be less complicated.

No need for that. When the lines are almost parallel, and don't cross each other, you can define some kind of distance, calculate that, and order them all based on it.

Example: take one of the lines, calculate its equation in the form f(x,y)=a*x+b*y+c.

All points on the line itself have f(x,y)=0 by definition.
The green/red points have a non-zero f value, take one of them, or the average, and use that as a distance.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Can you do this with a convex hull? Pin
Kyudos16-Feb-12 15:31
Kyudos16-Feb-12 15:31 
GeneralRe: Can you do this with a convex hull? Pin
BobJanova17-Feb-12 0:36
BobJanova17-Feb-12 0:36 
Questionwordwrap with minimum raggedness Pin
Member 858607226-Jan-12 10:09
Member 858607226-Jan-12 10:09 
AnswerCrosspost Pin
Peter_in_278026-Jan-12 11:37
professionalPeter_in_278026-Jan-12 11:37 
QuestionA type of balanced 0–1 matrix Pin
Member 858607221-Jan-12 8:01
Member 858607221-Jan-12 8:01 
AnswerRe: A type of balanced 0–1 matrix Pin
Alan Balkany16-Feb-12 4:08
Alan Balkany16-Feb-12 4:08 
Questioninput Pin
AsadRana21-Jan-12 1:27
AsadRana21-Jan-12 1:27 
AnswerRe: input Pin
Richard MacCutchan21-Jan-12 2:34
mveRichard MacCutchan21-Jan-12 2:34 
AnswerRe: input Pin
BillWoodruff29-Jan-12 13:08
professionalBillWoodruff29-Jan-12 13:08 
QuestionnQueens algorithm Pin
PIEBALDconsult31-Dec-11 4:02
mvePIEBALDconsult31-Dec-11 4:02 
AnswerRe: nQueens algorithm Pin
DaveAuld31-Dec-11 4:49
professionalDaveAuld31-Dec-11 4:49 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult31-Dec-11 15:08
mvePIEBALDconsult31-Dec-11 15:08 
GeneralRe: nQueens algorithm Pin
Member 41945931-Jan-12 13:20
Member 41945931-Jan-12 13:20 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult1-Jan-12 16:14
mvePIEBALDconsult1-Jan-12 16:14 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult9-Jan-12 13:15
mvePIEBALDconsult9-Jan-12 13:15 
GeneralRe: nQueens algorithm Pin
Member 419459311-Jan-12 8:25
Member 419459311-Jan-12 8:25 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult11-Jan-12 9:35
mvePIEBALDconsult11-Jan-12 9:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.