Reputation: 11
I need to know how to determine fast if line intersects simple polygon. It should work in O(log n) time, where n is number of polygon's vertexes. I searched in google, but I didn't find anything useful, maybe I'm blind. ;) Edit: I'm using C++ but I think language isn't a problem, and it isn't homework, just doing some algorithms training. Geometry is sick. ;) Oh. I forgot it's only in 2d. Thanks for future and actual help.
Upvotes: 1
Views: 2620
Reputation: 1356
I've found a paper who solves this problem really fast:
"Fast MinimumStorage RayTriangle Intersection"
EDIT: It even contains code :)
Upvotes: 1