Home

Geometric Operations on Hundreds of Millions of Objects
Wm Randolph Franklin
Rensselaer Polytechnic Institute

Summary

Local topological data structures, uniform grids, KISS lead to fast implementations on large datasets.


Example: Mass Props

(500 squares illustrated.)


Application: Cutting Tool Path

(Image shows Surfware Inc's Surfcam.)


More Applications

VLSI Design

Sometimes polygons are designed as overlapping squares.

Cartographic Regions

Existing Method for Union Area


Problems With Usual Method for Area of Union of Many Objects

New Technique

Principles

Specifics


Output Polygon Format

Only data type is vertex, containing

Properties


Mass Properties of Rectilinear Polygons

Formulae generalize to other polygons, and to 3D.



Finding the Output Vertices

An output vertex is either:

but only some of them (10-6 in the big example).

specifically those vertices and intersections that are not inside any other square.

Required Operations


Edge intersection

Time = N*log(M) is too slow.

Even linear time is too slow.


Even linear time is too slow?!

The expected number of intersections is (NL/2)2

but

The expected number of intersections that become output vertices is O(N).

regardless of the depth complexity.

Why? The graph of output vertices, edges is planar.

Edge Intersection by Uniform Grid


Properties


Aside: Red-Blue Intersection

Moral: sometimes heuristics are necessary.

Time Details

(N edges, len L, cell size C)


Other Edge Intersection by Uniform Grid Examples


Varying edge lengths are not a problem.

Uniform Grid and Covering Squares


Solution: add the squares themselves to the grid.

If the cell size is somewhat smaller than the edge size then almost all the hidden intersections are never found. Good.

Expected time = size(input) + size(useful intersections).


Point Containment Testing

Q: How to test if a point P is contained in at least one square?

A: Start with the Jordan curve method. (Run a ray from P to infinity.)

Optimizations:

- Since the edges are oriented, sufficient to stop at the first edge.


Optimizations ctd

Time per point: proportional to average number of edges per cell. Constant (for certain cell sizes).

SoS for Degeneracies

Many degeneracies.

Use SoS.

If 2 coordinates compare equal, then compare on the edge number.


Determining Intersection Neighborhoods

Intersection Neighborhoods needed for area computation.

We know the 2 edges creating the intersection, including the edges' orientation.

That's enough.


Extension to General Polygons

The only data type is the incidence of an edge and a vertex, and its neighborhood. For each such:

Polygon: {(V, T, N)} (2 tuples per vertex)

Perimeter = -sum(V.T).             Area = 1/2 sum( V.T V.N )
Multiple nested components ok.


Extension to 3D

The only data type is the incidence of a face, an edge and a vertex, and its neighborhood. For each such:

Polyhedron: {(V, T, N, B)}

Perimeter = -1/2 sum(V.T)           Area = 1/2 sum( V.T V.N )
Volume = -1/6 sum( V.T V.N V.B )


Implementation Validation