Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Find all the intersection points between 2 line groups

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Find all the intersection points between 2 line groups


Chronological Thread 
  • From: Efraim Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Find all the intersection points between 2 line groups
  • Date: Wed, 07 Dec 2011 18:34:17 +0200

Using the a plane-sweep algorithm is probably the most efficient approach. You are looking for something similar to the overlay
operation, but in your case you need only the intersections (not the
arrangements). Sometimes this is also referred to as red-blue
intersections.

The Sweep_line_2 component of CGAL is an algorithmic framework. A
concrete algorithm is implemented through a visitor. Unfortunately, we
haven't exposed the interface of the visitor yet. If you want to use
this component, you must do one of the following:
1. Use the overlay mechanism: Construct 2 arrangements, say A and B,
from the 2 sets of lines, respectively, and compute their overlay
using the overlay() function while using, what we call, an overlay
traits (the 3rd argument to the function). The answer to what you need lies in this traits.
2. Change the visitor of the overlay (Arr_overlay_sl_visitor.h) to do what you need.

Quoting Graviton
<>:

I have two groups of line segments, and I want to find the intersection
between them. I understand that one can use
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Sweep_line_2/Chapter_main.html
sweep line algorithm to find all the intersection points within one line
groups. But now I have 2 line segment groups, and I want to find the
intersection between line in Group A and line in Group B ( I don't want the
intersection point between line segments among group A and line segments
among group B).

Any idea how CGAL can help in this?

--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/Find-all-the-intersection-points-between-2-line-groups-tp4168063p4168063.html
Sent from the cgal-discuss mailing list archive at Nabble.com.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss






Archive powered by MHonArc 2.6.16.

Top of Page