Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Segment Inside a Polygon

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Segment Inside a Polygon


Chronological Thread 
  • From: ayongwust_sjtu <>
  • To:
  • Subject: [cgal-discuss] Re: Segment Inside a Polygon
  • Date: Sun, 2 Sep 2012 19:31:17 -0700 (PDT)

I am afraid your algorithm is basically correct, except for the second step.
We made a trivial modification to it.

1. Iterate the intersection of the line segment with all the edges of the
polygon.

2. If there is intersection that is neither endpoints of the segment in
checking nor the polygon vertex,then the segment is not in the polygon and
exit. (/we prefer singulative expression, because in each time of iteration,
there is no more than one intersection of two segments/).

3. Check the middle point of line segment if it lies inside the polygon or
outside.



-----
-------------

Regards,
Xianyong Liu
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Segment-Inside-a-Polygon-tp4352456p4655786.html
Sent from the cgal-discuss mailing list archive at Nabble.com.


  • [cgal-discuss] Re: Segment Inside a Polygon, ayongwust_sjtu, 09/03/2012

Archive powered by MHonArc 2.6.18.

Top of Page