mark waitser computational geometry seminar december 19 2001 iterated snap rounding
Post on 21-Dec-2015
215 views
TRANSCRIPT
Mark Waitser
Computational Geometry Seminar
December 19 2001
Iterated Snap Iterated Snap RoundingRounding
AgendaAgendaIntroductionISR AlgorithmExample of ISRISR DetailsISR Complexity AnalysisISR Data StructureExamples of SR & ISRConclusion
IntroductionIntroductionSnap 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.
- 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 - DefinitionsIntroduction - Definitions
S SA nsssS ,, 21
SA
H SA
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.
Introduction - Iterated Snap Introduction - Iterated Snap RoundingRounding
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.
ISR – Goal of Algorithm.ISR – Goal of Algorithm.
Problem - Once we reroute a chain, it may have entered other hot pixels and it need to further reroute.
SR Problem.SR Problem.
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 – Rounding AlgorithmISR – Rounding Algorithm
D
Compute the Hot Pixels by finding all Vertices of the arrangement.
Prepare a segment intersection search structure on the Hot Pixels to answer following queries: Given a segment , report the Hot Pixels that intersects.
ISR – First StageISR – First Stage
Ds
s
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 – Second StageISR – Second Stage
Ss*s
s
ISR – Scheme of AlgorithmISR – Scheme of Algorithm
ISR – Reroute ProcedureISR – Reroute Procedure
Input arrangement (a)
ISR – ExampleISR – Example
Input arrangement (a)Step 1 arrangement (b)
ISR – Example – Step 1ISR – Example – Step 1
ISR – Example – Step 1ISR – Example – Step 1Step 1 arrangement (b)
ISR – Example – Step 2ISR – Example – Step 2Step 1 arrangement (b)Step 2 arrangement (c)
ISR – Example – Step 2ISR – Example – Step 2Step 2 arrangement (c)
ISR – Example – Step 3ISR – Example – Step 3Step 2 arrangement (c)Step 3 arrangement (d)
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 – Example – Reroute TreeISR – Example – Reroute Tree
1s
D
Lemma 1 Given 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 DetailsISR – Algorithmic DetailsS
S
nis ji ,,1,1
nis ji ,,1,
)( 2nO
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 DetailsISR – Algorithmic Details(continue)(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 DetailsISR – Algorithmic Details(continue)(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 – Algorithmic DetailsISR – Algorithmic Details(continue)(continue)
*s sik
ss
ik
ISR - Complexity AnalysisISR - 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
*is il
is
il
ISR - Complexity Analysis ISR - Complexity Analysis (continue)(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.
LNLInnO 3232log0 3232 NLNnO
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 – Search Structure DISR – Search Structure D
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 ISR – Structure D - kd-Tree
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).
ISR – Structure D - kd-Tree ISR – Structure D - kd-Tree (continue)(continue)
M(s).
B(s).
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).
ISR – Structure DISR – Structure Dc-oriented kd-Treec-oriented kd-Tree
Congestion Data– 200 segments and 18674 intersections.
Triangulation Data– 906 segments.
Geographic Data– Map of USA, 486 segments.
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Congestion DataCongestion Data
200 segments 18674 intersections.
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Congestion DataCongestion Data
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Triangulation DataTriangulation Data
906 segments.Intersections only in endpoints.
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Triangulation DataTriangulation Data
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Geographic DataGeographic Data486 segments.Intersections only in endpoints.
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Geographic DataGeographic Data
ConclusionsConclusions
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.
EndEnd
Abbreviation Explanation
Rounding Examples: SR vs. ISR Rounding Examples: SR vs. ISR (continue)(continue)
inkd input number of kd-trees
nkd actual number of kd-trees created
nfhp overall number of false hot pixels in all the queries
tt total time relative to using one tree
md maximum deviation over all chains ad average deviation
mnv maximum number of vertices in an output chain
anv average number of vertices in an output chain
mdvs minimum distance between a vertex and a non- incident edge
ncvs number of pairs of a vertex and a non-incident edge that are less than half the width of a pixel apart
ps pixel size
nhp number of hot pixels
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Congestion DataCongestion Data
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Triangulation DataTriangulation Data
Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Geographic DataGeographic Data