determine if line segment is inside polygon
Posted
by
dato
on Stack Overflow
See other posts from Stack Overflow
or by dato
Published on 2012-08-31T21:30:15Z
Indexed on
2012/08/31
21:38 UTC
Read the original article
Hit count: 148
suppose we have simple polygon(without holes) with vertices
(v0,v1,....vn)
my aim is to determine if for given point p(x,y)
any line segment connecting this point and any vertices of polygon is inside polygon or even for given two point
p(x0,y0) `p(x1,y1)`
line segment connecting these two point is inside polygon? i have searched many sites about this ,but i am still confused,generally i think we have to compare coordinates of vertices and by determing coordinates of which point is less or greater to another point's coordinates,we could determine location of any line segment,but i am not sure how correct is this,please help me
© Stack Overflow or respective owner