420 likes | 539 Views
Learn about the Iterated Snap Rounding (ISR) algorithm, a method for converting arrangements of segments into fixed-precision representation. This seminar covers ISR details, complexity analysis, data structure, examples of Snap Rounding (SR) and ISR, and concludes with algorithmic details and complexity analysis.
E N D
Iterated Snap Rounding Mark Waitser Computational Geometry Seminar December 19 2001
Agenda • Introduction • ISR Algorithm • Example of ISR • ISR Details • ISR Complexity Analysis • ISR Data Structure • Examples of SR & ISR • Conclusion
Introduction • Snap Rounding (SR) is a method for converting arbitrary-precision arrangements of segments into fixed-precision representation. • An arrangement of segments before (a) and after (b) snap rounding.
Introduction - Definitions • - Collection of input segments. • - Arrangement of . Subdivision of plane into vertices, edges and faces. • Vertex - is either a segment endpoint or the intersection of two segments. • Hot pixel - Pixel contains a vertex of • - Set of Hot Pixels induced by
Introduction - Iterated Snap Rounding • Iterated Snap Rounding (ISR) is a method which rounds the arrangement such that each vertex is at least half-the-width-of-a-pixel away from any non-incident edge. • ISR preserves the topology of the original arrangement. • Maximum combinatorial complexity is the SAME for SR and ISR.
ISR – Goal of Algorithm. • Create chains out of input segments such that a chain that passes through a hot pixel is re-routed to pass through the pixel’s center. • Each vertex is at least half-the-width-of-a-pixel away from any non-incident edge.
SR Problem. Problem - Once we reroute a chain, it may have entered other hot pixels and it need to further reroute.
ISR – Rounding Algorithm IRS algorithm consists of two stages: • First stage - Preprocessing stage - Compute the hot pixels and prepare a segment intersection search structure . • Second stage - Operate a recursive procedure, Reroute, on each input segment.
ISR – First Stage • Compute the Hot Pixels by finding all Vertices of the arrangement. • Prepare a segment intersection search structureon the Hot Pixels to answer following queries: Given a segment , report the Hot Pixels that intersects.
ISR – Second Stage • Operate a recursive procedure, Reroute, on each input segment. • Reroute is a “depth-first” procedure. • Reroute does not add more Hot Pixels. • Reroute input is a segment • Reroute output is a polygonal chain which approximates as an order list of links.
ISR – Example • Input arrangement (a)
ISR – Example – Step 1 • Input arrangement (a) • Step 1 arrangement (b)
ISR – Example – Step 1 • Step 1 arrangement (b)
ISR – Example – Step 2 • Step 1 arrangement (b) • Step 2 arrangement (c)
ISR – Example – Step 2 • Step 2 arrangement (c)
ISR – Example – Step 3 • Step 2 arrangement (c) • Step 3 arrangement (d)
ISR – Example – Reroute Tree • The Tree corresponding to Reroute( ). • Nodes denoted by full-line circles contain segments which query the structure • The dashed-line circle contains an exact copy of the segment of its parent.
ISR – Algorithmic Details Lemma 1Given a set of segments , the output of ISR is equivalent to the final output of finite series of SR starting with , where the output of one SR is the input to the next SR. Proof: • SR does not create new Hot Pixels • The chains are the result of applying SR to the links in chains • Hot Pixel is not discovered more that one per tree. • There are at most Hot Pixels, therefore the process will stop.
ISR – Algorithmic Details(continue) Corollary ISR preserves the topology of the arrangement of the input segments in the same sense that SR does. Proof: • ISR does not create new Vertices. • No Vertex of the arrangement ever crosses through a curve.
ISR – Algorithmic Details(continue) Lemma 2 • (i) If an output chain of ISR passes through a Hot Pixel then it passes through its center • (ii) In the output chains each vertex is at least 0.5 a unit away from any non incident segment. Proof: • (i) follows from the definition of the Reroute. • (i i) consequence of (i)
ISR – Algorithmic Details(continue) Lemma 3 • A final chain lies in the Minkowski sum of and a square of side centered at the origin. Proof: • In SR, a rounded segment lies inside the Minkowski sum of input segment and a unit square centered at origin. • ISR is equivalent to applications of SR.
ISR - Complexity Analysis Lemma 4 If an output chain consists of links then during Reroute( ) the structure D is queries at most 2 times. Proof: • It is clearly from definition of Reroute procedure
ISR - Complexity Analysis (continue) Theorem Given an arrangement of n segments with I intersection points, the ISR requires time for any and working storage, where N is the number of Hot Pixels (N=2n+I) and L is the overall number of links in the chains produced by the algorithm.
ISR – Search Structure D • In the theoretical analysis used (multi-level) partition trees. • Asymptotically good worst-case complexity. • Difficult to implement. • In practice implemented a data structure consisting of several kd-trees.
ISR – Structure D - kd-Tree • It answer range queries for axis-parallel rectangles. • It is practically efficient. • Worst-case query time is far from optimal.
ISR – Structure D - kd-Tree (continue) • Trivial solution – query axis-parallel bounding box (B(s)) of M(s). • The area of B(s) may be much large that the area of M(s). B(s). M(s).
ISR – Structure Dc-oriented kd-Tree • Construct a collection of kd-trees each serving as a range search structure for a rotated copy of the centers of Hot Pixels. • Goal is produce a number of rotated copies so that for each query segment there will be one rotation with not too much different between M(s) and B(s).
Rounding Examples: SR vs. ISR • Congestion Data • 200 segments and 18674 intersections. • Triangulation Data • 906 segments. • Geographic Data • Map of USA, 486 segments.
Rounding Examples: SR vs. ISRCongestion Data • 200 segments • 18674 intersections.
Rounding Examples: SR vs. ISRTriangulation Data • 906 segments. • Intersections only in endpoints.
Rounding Examples: SR vs. ISRGeographic Data • 486 segments. • Intersections only in endpoints.
Conclusions • Snap Rounding procedure which rounds Arbitrary Precision Arrangement in Rounded Arrangement. • Each Vertex at least half a unit away from any non-incident Edge. • New scheme more robust for further manipulation with limited precision arithmetic.
Rounding Examples: SR vs. ISR (continue) Abbreviation Explanation