Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Point in Polygon?

Name: Anonymous 2009-12-20 2:31

I wrote a simple SDL/OpenGL C++ program to test some Point-In-Polygon code I was writing for something else, but can't seem to find where the issue is in the actual point-in-polygon code. Any suggestions?

http://pastebin.com/m1d4c3104

Name: Anonymous 2009-12-20 4:38

>>1
I wrote a simple ... C++ program
We won't be able to help you if you can't stop lying to yourself.

Name: Anonymous 2009-12-20 4:42

>>2

Simple in comparison to what it COULD have been...

Name: Anonymous 2009-12-20 4:43

Use the tangent method.

Name: Anonymous 2009-12-20 4:49

>>4

Isn't ray tracing the more efficient method? Considering almost all the polygons I'll need to test are concave, not convex.

Name: Anonymous 2009-12-20 6:54

>>1
OP if you're testing for a point in polygon then checking boundaries (lines 53-58) is just needless branching. At least try to understand the fucking algorithm before coding it for fuck's sake.

I wrote a simple ... C++ program
Now you've got two problems.

>>5
Isn't ray tracing the more efficient method?
Not even wrong.

Name: Anonymous 2009-12-20 12:00

Name: Anonymous 2009-12-20 14:29

>>3
It could have been written in something other than C++, so no.

Name: Anonymous 2009-12-20 14:32

enjoy making toy programs, kids-for-programmers

Name: Anonymous 2009-12-20 14:35

>>9
I fact i was solving a user's(People like that are too dumb to live.) technical problem(Said problem was their inability to change their home page, which was solved in 3 clicks) few minutes ago.

Name: Anonymous 2010-12-24 16:00


Don't change these.
Name: Email:
Entire Thread Thread List