Lecture 5

Lecture 5 - Lecture 5 Line Segment Intersection Reading...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
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 3-space 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 worst-case 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.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Complexity: We claim that best worst-case running time that one might hope for is O ( n log n + I ) time algorithm. Clearly we need
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

Lecture 5 - Lecture 5 Line Segment Intersection Reading...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online