Download presentation
Presentation is loading. Please wait.
Published byDortha Melton Modified over 9 years ago
1
Computing the Volume of the Union of Cubes in R 3 Pankaj K. Agarwal Haim Kaplan Micha Sharir
2
Problem Statement C : Set of n cubes in R 3 U ( C ): Union of cubes in C Compute Vol( U ( C )) U ( C ) has (n 2 ) vertices ! Cannot compute U ( C ) explicitly if looking for o(n 2 ) algorithm!
3
Related Work B : Set of n orthogonal boxes in R d Compute Vol( U ( B )). d=1: O(nlogn) [Klee, 1977] (nlogn) [Fredman-Weide, 1978] d=2: O(nlogn) [Bentley,1977] d≥3: O(n d-1 logn) [Bentley,1977] O(n d/2 logn) [Overmars-Yap, 1988] Can one do better if B is a set of cubes?
4
Our Result Theorem: Volume of the union of n cubes in R 3 can be computed in O(n 4/3 log n) time. Plane sweep algorithm (as Overmars-Yap algorithm) Dynamic data structure to maintain the union of squares –O(n 1/3 log n) (amortized) time per insert/delete Conjecture : O(npolylog(n)) algorithm
5
Overmars-Yap Algorithm (d=3) Sweep a plane in +z-direction Maintain the area of the cross section of the union
6
Union of Cross-Section R: Intersection rectangles of B & the sweep plane Maintain Area( U (R))
7
Maintaining theArea Project R on the x-y plane and bound in a box B Insert/Delete rectangles in R B
8
Partition B into slabs, n 1/2 vertical edges (& vertices) in a slab Data Structure B
9
Partition each slab into n 1/2 cells; no vertex in a cell Maintain the union of rectangles within each cell B
10
A segment tree over each slab Maintains the union within slab Update segment tree when a rectangle intersecting the slab is inserted or deleted
11
Back to cubes n 1/3 slabs, n 1/3 cells in a slab, n 1/3 points in a cell
12
A square intersects a cell in a more complicated way
13
Classification of Squares in a cell x0x0 x1x1 y0y0 y1y1
14
Pillars (long) Classification of Rectangles in a cell
15
lower rim (long)
16
upper rim (long)
17
corners (short), #corners = n 1/3
18
floaters (short), #floaters= n 1/3
19
Easy to maintain the area of the union of each class Combining the area of different classes is difficult Maintain the areas of disjoint regions rims pillars – rims corners – pillars – rims floaters – corners – pillars – rims Update these areas as squares inserted/deleted Insertion/deletion of a Long square: O(log n) time Short square: O(n 1/3 log n)
20
lower rim (long) Maintain a list of lower rim squares sorted by increasing y coordinate of the top edge floor
21
ceiling Area = [(y 1 -ceil)+(floor-y 0 )](x 1 -x 0 ) + …
22
π Area = [(y 1 -ceil)+(floor-y 0 )](x 1 -x 0 ) + π(ceil-floor) + … Maintain the cross section of the pillars with the bottom edge
23
Corners: Partition their union into disjoint rectangles
24
Combine corners wilth pillars & rims to maintain ψ : Area(corners-pillars-rims) Area = [(y 1 -ceil)+(floor-y 0 )](x 1 -x 0 ) + π(ceil-floor) + ψ … # rectangles: n 1/3 floor ceiling
25
Maintaining Floaters Decompose the portion of union of floaters outside corners into a set R of disjoint rectangles |R| = n 1/3
26
Combine R with pillars and rims to maintain φ : Area(R– pillars – rims) Area = [(y 1 -ceil)+(floor-y 0 )](x 1 -x 0 ) + π(ceil-floor) + ψ + φ floor ceiling
27
Updating the Area Inserting/deleting a corner/floater –Recompute ψ, φ –Time: O(n 1/3 log n) Inserting/deleting a pillar –Update ψ, π, φ –Time: O(log n) Inserting/deleting a lower (upper) rim –Update area of rims, ψ, π, φ –Updating ψ, φ is expensive floor ceiling Recompute ψ, φ whenever flr/ceiling crosses a floater boundary
28
floor ceiling A bottom or top edge of a “floater” can be covered once Charge the time spent in updating ψ, φ to the floater edge Amortized time to insert/delete rim: O(log n) Fortunately:
29
Summary lots of open questions remain: Improve the bound for cubes ? Improve the bound for general boxes ? Higher dimensions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.