Question: Given a simple polygon P with n vertices and a query point q , here is an algorithm to determine whether q lies in P
Given a simple polygon P with n vertices and a query point q here is
an algorithm to determine whether q lies in P Consider the ray :
qx q y : this is the horizontal ray starting in q and going
rightwards Determine for every edge e of P whether it intersects If
the number of intersecting edges is odd, then q in P otherwise q in P
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
