Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

42
Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Iterated Snap Rounding Rounding
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    214
  • download

    0

Transcript of Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Page 1: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Mark Waitser

Computational Geometry Seminar

December 19 2001

Iterated Snap Iterated Snap RoundingRounding

Page 2: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

AgendaAgendaIntroductionISR AlgorithmExample of ISRISR DetailsISR Complexity AnalysisISR Data StructureExamples of SR & ISRConclusion

Page 3: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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.

Page 4: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated 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

Page 5: Mark Waitser Computational Geometry Seminar December 19 2001 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.

Introduction - Iterated Snap Introduction - Iterated Snap RoundingRounding

Page 6: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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.

Page 7: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Problem - Once we reroute a chain, it may have entered other hot pixels and it need to further reroute.

SR Problem.SR Problem.

Page 8: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 9: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 10: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 11: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

ISR – Scheme of AlgorithmISR – Scheme of Algorithm

Page 12: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

ISR – Reroute ProcedureISR – Reroute Procedure

Page 13: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Input arrangement (a)

ISR – ExampleISR – Example

Page 14: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Input arrangement (a)Step 1 arrangement (b)

ISR – Example – Step 1ISR – Example – Step 1

Page 15: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

ISR – Example – Step 1ISR – Example – Step 1Step 1 arrangement (b)

Page 16: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

ISR – Example – Step 2ISR – Example – Step 2Step 1 arrangement (b)Step 2 arrangement (c)

Page 17: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

ISR – Example – Step 2ISR – Example – Step 2Step 2 arrangement (c)

Page 18: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

ISR – Example – Step 3ISR – Example – Step 3Step 2 arrangement (c)Step 3 arrangement (d)

Page 19: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 20: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 21: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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)

Page 22: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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)

Page 23: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 24: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 25: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 26: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 27: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 28: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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).

Page 29: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 30: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 31: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Congestion DataCongestion Data

200 segments 18674 intersections.

Page 32: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Congestion DataCongestion Data

Page 33: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Triangulation DataTriangulation Data

906 segments.Intersections only in endpoints.

Page 34: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Triangulation DataTriangulation Data

Page 35: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Geographic DataGeographic Data486 segments.Intersections only in endpoints.

Page 36: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Geographic DataGeographic Data

Page 37: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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.

Page 38: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

EndEnd

Page 39: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

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

Page 40: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Congestion DataCongestion Data

Page 41: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Triangulation DataTriangulation Data

Page 42: Mark Waitser Computational Geometry Seminar December 19 2001 Iterated Snap Rounding.

Rounding Examples: SR vs. ISRRounding Examples: SR vs. ISR Geographic DataGeographic Data