The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Intersection Detection Next: Bin Packing Up: Computational Geometry Previous: Point Location Intersection Detection Input description: A set S of lines and line segments or a pair of polygons or polyhedra and . Problem description: Which pairs of line segments intersect each other? What is the intersection of and ? Discussion: Intersection detection is a fundamental geometric primitive that arises in many applications. Picture a virtual-reality simulation of an architectural model for a building. The illusion of reality vanishes the instant the virtual person walks through a virtual wall. To enforce such physical constraints, any such intersection between polyhedral models must be immediately detected and the operator notified or constrained. Another application of intersection detection is design rule checking for VLSI layouts. A minor design mistake resulting in two crossing metal strips can short out the chip, but such errors can be detected before fabrication using programs to find all intersections between line segments. Issues arising in intersection detection include: file:///E|/BOOK/BOOK4/NODE191.HTM (1 of 5) [19/1/2003 1:31:48]
Intersection Detection ● Do you want to compute the intersection or just report it? - We distinguish between intersection detection and computing the actual intersection. The latter problem is obviously harder than the former and is not always necessary. In the virtual-reality application above, it might not be important to know exactly where we hit the wall, just that we hit it. ● Are you intersecting lines or line segments? - The big difference here is that any two lines with different slopes must intersect at exactly one point. By comparing each line against every other line, all points of intersections can be found in constant time per point, which is clearly optimal. Constructing the arrangement of the lines provides more information than just intersection points and is discussed in Section . Finding all the intersections between n line segments is considerably more challenging. Even the basic primitive of testing whether two line segments intersect is not as trivial as it might seem, and this is discussed in Section . To find all intersections, we can explicitly test each line segment against each other line segment and thus find all intersections in time. Each segment can always intersect each other segment, yielding a quadratic number of intersections, so in the worst case, this is optimal. For many applications, however, this worst case is not very interesting. ● How many intersection points do you expect? - Sometimes, as in VLSI design rule checking, we expect the set of line segments to have few if any intersections. What we seek is an algorithm whose time is output sensitive, taking time proportional to the number of intersection points. Such output-sensitive algorithms exist for line-segment intersection, with the fastest algorithm taking time, where k is the number of intersections. Such algorithms are sufficiently complicated that you should use an existing implementation if you can. These algorithms are based on the sweepline approach, discussed below. ● Can you see point x from point y? - Visibility queries ask whether vertex x can see vertex y unobstructed in a room full of obstacles. This can be phrased as the following line-segment intersection problem: does the line segment from x to y intersect any obstacle? Such visibility problems arise in robot motion planning (see Section ) and in hidden-surface elimination for computer graphics. ● Are the intersecting objects convex? - Better intersection algorithms exist when the line segments form the boundaries of polygons. The critical issue here becomes whether the polygons are convex. Intersecting a convex n-gon with a convex m-gon can be done in O(n+m) time, using a sweepline algorithm as discussed below. This is possible because the intersection of two convex polygons must form another convex polygon using at most n+m vertices. However, the intersection of two nonconvex polygons is not so well behaved. Consider the intersection of two ``combs'' generalizing the Picasso-like frontspiece to this section. As illustrated, the intersection of nonconvex polygons may be disconnected and have quadratic size in the worst case. file:///E|/BOOK/BOOK4/NODE191.HTM (2 of 5) [19/1/2003 1:31:48]
- Page 533 and 534: Graph Partition annealing, is almos
- Page 535 and 536: Vertex Coloring Several special cas
- Page 537 and 538: Vertex Coloring Notes: An excellent
- Page 539 and 540: Edge Coloring The minimum number of
- Page 541 and 542: Graph Isomorphism Next: Steiner Tre
- Page 543 and 544: Graph Isomorphism vertices into equ
- Page 545 and 546: Steiner Tree Next: Feedback Edge/Ve
- Page 547 and 548: Steiner Tree The worst case for a m
- Page 549 and 550: Feedback Edge/Vertex Set Next: Comp
- Page 551 and 552: Feedback Edge/Vertex Set An interes
- Page 553 and 554: Computational Geometry complete bib
- Page 555 and 556: Robust Geometric Primitives Next: C
- Page 557 and 558: Robust Geometric Primitives ● Are
- Page 559 and 560: Robust Geometric Primitives Related
- Page 561 and 562: Convex Hull ● How many dimensions
- Page 563 and 564: Convex Hull http://www.cs.att.com/n
- Page 565 and 566: Triangulation Next: Voronoi Diagram
- Page 567 and 568: Triangulation GEOMPACK is a suite o
- Page 569 and 570: Voronoi Diagrams Next: Nearest Neig
- Page 571 and 572: Voronoi Diagrams McDonald's, the ti
- Page 573 and 574: Nearest Neighbor Search Next: Range
- Page 575 and 576: Nearest Neighbor Search Implementat
- Page 577 and 578: Range Search Next: Point Location U
- Page 579 and 580: Range Search subdivisions in C++. I
- Page 581 and 582: Point Location the n edges for inte
- Page 583: Point Location More recently, there
- Page 587 and 588: Intersection Detection Implementati
- Page 589 and 590: Bin Packing Next: Medial-Axis Trans
- Page 591 and 592: Bin Packing approach for general sh
- Page 593 and 594: Medial-Axis Transformation Next: Po
- Page 595 and 596: Medial-Axis Transformation Implemen
- Page 597 and 598: Polygon Partitioning number of piec
- Page 599 and 600: Simplifying Polygons Next: Shape Si
- Page 601 and 602: Simplifying Polygons vertices and o
- Page 603 and 604: Shape Similarity Next: Motion Plann
- Page 605 and 606: Shape Similarity or how close it is
- Page 607 and 608: Motion Planning There is a wide ran
- Page 609 and 610: Motion Planning often arise in the
- Page 611 and 612: Maintaining Line Arrangements Think
- Page 613 and 614: Maintaining Line Arrangements Next:
- Page 615 and 616: Minkowski Sum where x+y is the vect
- Page 617 and 618: Set and String Problems Next: Set C
- Page 619 and 620: Set Cover Next: Set Packing Up: Set
- Page 621 and 622: Set Cover Figure: Hitting set is du
- Page 623 and 624: Set Packing Next: String Matching U
- Page 625 and 626: Set Packing Notes: An excellent exp
- Page 627 and 628: String Matching shouldn't try. Furt
- Page 629 and 630: String Matching and texts, I recomm
- Page 631 and 632: Approximate String Matching This sa
- Page 633 and 634: Approximate String Matching http://
Intersection Detection<br />
Next: Bin Packing Up: Computational Geometry Previous: Point Location<br />
Intersection Detection<br />
Input description: A set S of lines and line segments or a pair of polygons or polyhedra and<br />
.<br />
Problem description: Which pairs of line segments intersect each other? What is the intersection of<br />
and ?<br />
Discussion: Intersection detection is a fundamental geometric primitive that arises in many applications.<br />
Picture a virtual-reality simulation of an architectural model for a building. <strong>The</strong> illusion of reality<br />
vanishes the instant the virtual person walks through a virtual wall. To enforce such physical constraints,<br />
any such intersection between polyhedral models must be immediately detected and the operator notified<br />
or constrained.<br />
Another application of intersection detection is design rule checking for VLSI layouts. A minor design<br />
mistake resulting in two crossing metal strips can short out the chip, but such errors can be detected<br />
before fabrication using programs to find all intersections between line segments.<br />
Issues arising in intersection detection include:<br />
file:///E|/BOOK/BOOK4/NODE191.HTM (1 of 5) [19/1/2003 1:31:48]