Subject: CGAL users discussion list
List archive
- From: pgiitu <>
- To:
- Subject: [cgal-discuss] Re: Segment Inside a Polygon
- Date: Fri, 3 Feb 2012 06:10:05 -0800 (PST)
Hii
First of all I am sorry for the confusion. The line segment with points on
the boundary of the polygon are also allowed(There should not be any point
on the line segment which lies outside the polygon).
I think the the algorithm is like this:-
1. Calculate the intersections of the line segment with all the edges of the
polygon.
2. If there is is/are intersection/intersections other than the vertices of
the polygon then the segment is not in the polygon.
3. If there is no intersection then we need to check for some point on the
line segment if it lies inside the polygon or outside.
I have implemented it in the above mentioned way and I hope that it works.
If there is any problem in the above algorithm please let me know.
Anyways Thank you very much for the help......
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Segment-Inside-a-Polygon-tp4352456p4354698.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Segment Inside a Polygon, pgiitu, 02/02/2012
- Re: [cgal-discuss] Segment Inside a Polygon, Sandeep Dey, 02/02/2012
- Re: [cgal-discuss] Segment Inside a Polygon, Sandeep Dey, 02/02/2012
- [cgal-discuss] Re: Segment Inside a Polygon, pgiitu, 02/03/2012
- Re: [cgal-discuss] Re: Segment Inside a Polygon, Sandeep Dey, 02/03/2012
- Re: [cgal-discuss] Re: Segment Inside a Polygon, Sebastien Loriot (GeometryFactory), 02/03/2012
- [cgal-discuss] Re: Segment Inside a Polygon, pgiitu, 02/03/2012
- [cgal-discuss] Re: Segment Inside a Polygon, pgiitu, 02/03/2012
- [cgal-discuss] Re: Segment Inside a Polygon, pgiitu, 02/03/2012
- Re: [cgal-discuss] Re: Segment Inside a Polygon, Sebastien Loriot (GeometryFactory), 02/03/2012
- Re: [cgal-discuss] Re: Segment Inside a Polygon, Sandeep Dey, 02/03/2012
- [cgal-discuss] Re: Segment Inside a Polygon, pgiitu, 02/03/2012
- Re: [cgal-discuss] Segment Inside a Polygon, Sandeep Dey, 02/02/2012
- Re: [cgal-discuss] Segment Inside a Polygon, Sandeep Dey, 02/02/2012
Archive powered by MHonArc 2.6.16.