Subject: CGAL users discussion list
List archive
- From: Ashwin Nanjappa <>
- To:
- Subject: Re: [cgal-discuss] How to find the intersection between a polygon and
- Date: Tue, 2 Jun 2009 16:07:47 +0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=DcgvwpsGB99cRVjF9qimI8RwRkBUNqxAFX+4kROrc07ii/3BTj5oiocBgwUqjO4ntd ke0jwEKVsE2c+QO4pyFxqlTpuihfa/QnsU3PZc5j6M5j3urREK6Exed6QvBmsQ8pPcrq X+Jy0AYlynZITvZH2EERE4sWLcbLSzwfV3Hds=
On Sun, May 24, 2009 at 23:01, Dietrich Bollmann
<>
wrote:
> What would be the best way to find the intersections between a polygon
> and a line segment?
>
> o
> ?/
> o--+--o
> | / |
> |/ |
> +? |
> /| |
> / o-----o
> o
If your polygon is convex, then you could decompose it into triangles
and intersect each triangle with the line segment using the
CGAL::intersection function:
<http://www.cgal.org/Manual/3.4/doc_html/cgal_manual/Kernel_23_ref/Function_intersection.html>
From the various intersection points & segments you would get, you
might have to sift out the 2 intersection points that lie on the
polygon boundary and connect them up to get the intersection segment.
~ash
- Re: [cgal-discuss] How to find the intersection between a polygon and, Ashwin Nanjappa, 06/02/2009
Archive powered by MHonArc 2.6.16.