Lecture 5: Line Segment Intersection
Reading: Chapter 2 in the 4M’s.
Geometric intersections: One of the most basic problems in computational geometry is that
of computing intersections.
Intersection computation in 2 and 3space is basic to many different application areas.
²
In solid modeling people often build up complex shapes by applying various boolean
operations (intersection,
union, and difference) to simple primitive shapes. The process in called
constructive solid
geometry
(CSG). In order to perform these operations, the most basic step is determining the points
where the
boundaries of the two objects intersect.
²
In robotics and motion planning it is important to know when two objects intersect for
collision detection
and
collision avoidance
.
²
In geographic information systems it is often useful to
overlay
two subdivisions (e.g. a road
network and
county boundaries to determine where road maintenance responsibilities lie). Since these
networks are
formed from collections of line segments, this generates a problem of determining
intersections of line
segments.
²
In computer graphics,
ray shooting
is an important method for rendering scenes. The
computationally
most intensive part of ray shooting is determining the intersection of the ray with other
objects.
Most complex intersection problems are broken down to successively simpler and simpler
intersection problems.
Today, we will discuss the most basic algorithm, upon which most complex algorithms are
based.
Lecture Notes 20 CMSC 754
Line segment intersection: The problem that we will consider is, given
n
line segments in the
plane, report all
points where a pair of line segments intersect. We assume that each line segment is
represented by giving the
coordinates of its two endpoints.
Observe that
n
line segments can intersect in as few as 0 and as many as
¡
n
2
¢
=
O
(
n
2
) different intersection
points. We could settle for an
O
(
n
2
) algorithm, claiming that it is worstcase asymptotically
optimal, but it
would not be very useful in practice, since in many instances of intersection problems
intersections may be rare.
Therefore it seems reasonable to look for an
output sensitive algorithm
, that is, one whose
running time should
be efficient both with respect to input and output size.
Let
I
denote the number of intersections. We will assume that the line segments are in
general position, and
so we will not be concerned with the issue of whether three or more lines intersect in a
single point. However,
generalizing the algorithm to handle such degeneracies efficiently is an interesting exercise.
See our book for
more discussion of this.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentComplexity: We claim that best worstcase running time that one might hope for is
O
(
n
log
n
+
I
) time algorithm.
Clearly we need
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '08
 Garrison
 Line segment, Line segment intersection, Sweep line algorithm, sweep line

Click to edit the document details