There is a n sided regular polygon and there is a point .What is the minimum number of lines a person has to draw to determine whether point is inside the polygon in worst case.For example for n=5 there should be 4 lines (worst case).How should i approach.
how to determine minimum number of lines for points location with respect to n sided regular polygon
Asked
Active
Viewed 96 times
-1
-
1What information you gain after drawing some line exactly? – Cris Jul 19 '14 at 19:33
-
Point's location wrt line – akashdeep singh Jul 19 '14 at 19:37
1 Answers
0
I am very confused by this question what exactly are you asking?
for point inside polygon test you need to cast just 1 line
- semi axis from that point to any direction and just count the intersections
- the blue arrowed line on image below
- see hit test
did you mean how many lines this semi axis could hit instead?
- in that case for convex polygon 2 or 4 (4 if you hit the vertexes)
- for N-lines concave polygon N-1 or N in the worst case.
- the regularity does not mean anything in this case unless I misunderstood something ...
- may be an image of what you want will be better then text
- this is how I see it:
- blue dot is your tested point
- blue arrow is casted semi axis
- green lines are hit-ed lines of polygon