{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Lec18 - Intersection Introduction Intersection example 1...

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

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 )

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

View Full Document
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
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

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

View Full Document
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
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

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

View Full Document
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?
Intersection 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.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern