Lec18 - Intersection Introduction Intersection example 1...

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

View Full Document Right Arrow Icon
Intersection Introduction Intersection example 1 Given a set of N axis-parallel rectangles in the plane, report all intersecting pairs. (Intersect share at least one point.) r 7 r 2 r 8 r 6 r 5 r 4 r 3 r 1 Answer: ( r 1 , r 3 ) ( r 1 , r 8 ) ( r 3 , r 4 ) ( r 3 , r 5 ) ( r 4 , r 5 ) ( r 7 , r 8 )
Background image of page 1

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

View Full DocumentRight Arrow Icon
Intersection example 2 Given two convex polygons, construct their intersection. (Polygon boundary and interior, intersection all points that are members of both polygons.) A B A B Intersection Introduction
Background image of page 2
General intersection problems Test or decision problem Given two geometric objects, determine if they intersect. Pairwise counting or reporting problem Given a data set of N geometric objects, count or report their intersections. Construction problem Given a data set of N geometric objects, construct a new object which is their intersection. Intersection Introduction
Background image of page 3

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

View Full DocumentRight Arrow Icon
Applications Domain: Graphics Problem: Hidden-line and hidden surface removal Approach: Intersection of two polygons Type: Construction Domain: Pattern recognition Problem: Finding a linear classifier between two sets of points Approach: Intersection of convex hulls Type: Test Domain: VLSI design Problem: Component overlap detection Approach: Intersection of rectangles Type: Pairwise Intersection Introduction
Background image of page 4
Problem definition Given N line segments in the plane, report all their points of intersection (pairwise). LINE SEGMENT INTERSECTION (LSI). INSTANCE: Set S = { s 1 , s 2 , . .., s N } of line segments in the plane. For 1 i N , s i = ( e i1 , e i2 ) (endpoints of the segments), and for 1 j 2, e ij = ( x ij , y ij ) (coordinates of the endpoints). QUESTION: Report all points of intersection of segments in S . Note that this problem is single-shot, not repetitive mode. Assumptions 1. No segments of S are vertical. 2. No three segments meet at a point. Intersection Intersection of line segments
Background image of page 5

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

View Full DocumentRight Arrow Icon
Intersection Intersection of line segments, brute force algorithm Algorithm For every pair of segments in S , test the two segments for intersection. (Segment intersection test can be done in constant time. The test involves the parametric equations of the lines defined by the segments and the dot product operation. See Laszlo pp. 90-93 for details.) Analysis Preprocessing: None Query: O ( N 2 ); there are N ( N - 1) / 2 O ( N 2 ) pairs, each requiring a constant time test. Storage: O ( N ); for S . Can we do better?
Background image of page 6
Intersection of line segments, Shamos-Hoey algorithm Segment ordering, 1 We need some way to order segments in the plane. Two segments are comparable at abscissa x iff 5 a vertical line through x that intersects both of them. Define the relation above at x as follows: segment s 1 is above segment s 2 at x , written s 1 > x s 2 , if s 1 and s 2 are comparable at x and the y -coordinate of the intersection of s 1 with the vertical line through x is greater than the y -coordinate of the intersection of s 2 with that line. u
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/14/2011 for the course COT 5520 taught by Professor Mukherjee during the Summer '11 term at University of Central Florida.

Page1 / 89

Lec18 - Intersection Introduction Intersection example 1...

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

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