{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lec18 - Intersection Introduction Intersection example 1...

Info icon This 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 )
Image of page 1

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

View Full Document Right 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
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
Image of page 3

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

View Full Document Right 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
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
Image of page 5

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

View Full Document Right 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?
Image of page 6
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.
Image of page 7

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern