Click here to Skip to main content
15,895,809 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Segment Polygon Intersection [modified] Pin
Alan Balkany17-Oct-08 3:23
Alan Balkany17-Oct-08 3:23 
GeneralRe: Segment Polygon Intersection Pin
hockymot2008_200917-Oct-08 3:35
hockymot2008_200917-Oct-08 3:35 
GeneralRe: Segment Polygon Intersection Pin
Member 41945933-Dec-08 11:02
Member 41945933-Dec-08 11:02 
GeneralRe: Segment Polygon Intersection Pin
Alan Balkany3-Dec-08 11:07
Alan Balkany3-Dec-08 11:07 
GeneralRe: Segment Polygon Intersection Pin
Member 41945933-Dec-08 12:22
Member 41945933-Dec-08 12:22 
GeneralRe: Segment Polygon Intersection Pin
Alan Balkany4-Dec-08 3:28
Alan Balkany4-Dec-08 3:28 
GeneralRe: Segment Polygon Intersection Pin
Member 41945934-Dec-08 4:24
Member 41945934-Dec-08 4:24 
GeneralRe: Segment Polygon Intersection Pin
darrellp28-Nov-08 21:10
darrellp28-Nov-08 21:10 
Depends on your situation. You should probably do a bounding box check first since it's simple, quick and will eliminate a lot of lines.

There's an entire book essentially on this subject:
http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/ref=sr_1_1?ie=UTF8&s=books&qid=1227945892&sr=1-1[^]

Some of the things you need to think about:
Are your polygons convex or can they be concave?
Are you testing fixed polygons against a series of lines or does the polygon change with each test?
Are your lines more likely to miss than not?

BSP trees are worth looking into if you really want to squeeze every last drop of performance. They're a bit complex, though and mostly good for lots of lines testing against a single polygon.
Questionplz help me Pin
luna201015-Oct-08 1:50
luna201015-Oct-08 1:50 
AnswerRe: plz help me Pin
CPallini15-Oct-08 2:21
mveCPallini15-Oct-08 2:21 
AnswerRe: plz help me Pin
73Zeppelin15-Oct-08 5:27
73Zeppelin15-Oct-08 5:27 
AnswerRe: plz help me Pin
Paul Conrad15-Oct-08 6:41
professionalPaul Conrad15-Oct-08 6:41 
AnswerRe: plz help me Pin
sumit703416-Oct-08 1:44
sumit703416-Oct-08 1:44 
QuestionPattern Decoder Pin
hdsouza112-Oct-08 17:43
hdsouza112-Oct-08 17:43 
AnswerRe: Pattern Decoder Pin
CPallini14-Oct-08 1:03
mveCPallini14-Oct-08 1:03 
AnswerRe: Pattern Decoder Pin
73Zeppelin14-Oct-08 2:46
73Zeppelin14-Oct-08 2:46 
GeneralRe: Pattern Decoder Pin
hdsouza114-Oct-08 8:29
hdsouza114-Oct-08 8:29 
GeneralRe: Pattern Decoder Pin
73Zeppelin15-Oct-08 1:03
73Zeppelin15-Oct-08 1:03 
AnswerRe: Pattern Decoder Pin
Paul Conrad14-Oct-08 7:01
professionalPaul Conrad14-Oct-08 7:01 
AnswerRe: Pattern Decoder Pin
shrewdlin14-Oct-08 15:08
shrewdlin14-Oct-08 15:08 
GeneralRe: Pattern Decoder Pin
hdsouza114-Oct-08 15:25
hdsouza114-Oct-08 15:25 
GeneralRe: Pattern Decoder Pin
shrewdlin14-Oct-08 20:39
shrewdlin14-Oct-08 20:39 
GeneralRe: Pattern Decoder Pin
CPallini15-Oct-08 2:23
mveCPallini15-Oct-08 2:23 
GeneralRe: Pattern Decoder Pin
hdsouza115-Oct-08 14:47
hdsouza115-Oct-08 14:47 
GeneralRe: Pattern Decoder Pin
cp987615-Oct-08 19:43
cp987615-Oct-08 19:43 

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.