Luca Castelli Aleardi
LIX ´ Ecole Polytechnique Geometrica - INRIA Sophia
11 mars 2007, INRIA, Sophia-Antipolis
Compact representations of geometric data structures
Gilles Schaeffer
Olivier Devillers Abdelkrim Mebarki
Domain and motivations
Triangulations and graphs
Geometric data
Geometric modeling
Tetrahedral Volume Meshes 3D meshes
GIS Technology
Applications
Surface recontruction
Very large geometric data
St. Matthew (Stanford’s Digital Michelan- gelo Project, 2000)
186 millions vertices
6 Giga bytes (for storing on disk)
tens of minutes (for loading the model from disk)
David statue (Stanford’s Digital Michelan- gelo Project, 2000)
2 billions polygons
32 Giga bytes (without compression)
No existing algorithm nor data
structure for dealing with the entire
model
Research topics
Mesh compression
Compact representations of geometric data structures Geometric data structures
i .. .
disk storage
Transmission
Compact representations
1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0
⇒ 2n bits for encoding a tree with n edges
ordered tree with n edges
balanced parenthesis word
kB n k = n+1 1 2n n ≈ 2 2n n − 3 2
Enumeration of plane trees with n edges
An example: plane trees
Asymptotic optimal encoding
• the cost of an object matches asymptotically the en- tropy
log 2 kB n k = 2n + O(lg n)
1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0
⇒ 2n bits for encoding a tree with n edges
ordered tree with n edges
balanced parenthesis word
An example: plane trees
No efficient implementation of local adjacency queries
1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0
⇒ 2n bits for encoding a tree with n edges
ordered tree with n edges
balanced parenthesis word
An example: plane trees
Explicit pointers based representation
not optimal encoding: we need Θ(n lg n) bits
parent parent
/ / / /
parent
/ / / /
/
lg n
lg n lg n
lg n
lg n
adjacency queries between vertices in O(1) time
parent parent
parent parent
An example: plane trees
Could we do better?
a compact encoding (asymptotically optimal)
testing adjacency queries efficiently (in O(1) time)
with the guarantee the the encoding is still asymptotically optimal it is possible to test adjacency between vertices in O(1) time
For trees and parenthesis words the anser is... YES
( ( ( ( ) ) )
11 0 00 00 0 0 1 00 0 0 1 00 0 0 1 00 b 1 b 2 b 3 b 4 b 5
5 2 4 4 5
0 3 2 3 2
D
B T 3
2
1 5
10
6 8
9
7 4
2n + o(n) bits are sufficient
) ( ) ) (( ( ) ) () ( ) ) (
(Jacobson, Focs89, Munro et Raman Focs97)
An example: binary and ordered trees
Geometric data
Triangulations with a boundary
3-connected planar maps (polygonal meshes)
Triangulations of the sphere
Which information?
Geometry and connectivity
Geometric object
Geometric information
Combinatorial objetct
Geometric object
x y z
between 30 et 96 bits/vertex
Geometric information
vertex triangle
1 reference to a triangle 3 references to vertices 3 references to triangles
log n ou 32 bits
Connectivity information
Combinatorial object
connectivity
2 × n × 6 × log n n × 1 × log n
13n log n
416n bits
Entropy bounds are known...
2.17 bits/edge 1.62 bits/triangle
2 bits/edge
Triangulations with a boundary
3-connected planar maps (polygonal meshes)
Triangulations of the sphere
Enumeration of planar triangulations (Tutte, 1962)
Enumeration and entropy of planar maps
Ψ n = 2(4n + 1)!
(3n + 2)!(n + 1)! ≈ 16 27
r 3
2π n −5/2 ( 256 27 ) n
1
n log 2 Ψ n ≈ log 2 ( 256
27 ) ≈ 3.2451 bits/vertex
Entropy
Triangulations with a boundary
n + 1 internal vertices, m = 2n + k faces
f (n, k) = 2 · (2k − 3)! (2k + 4n − 1)!
(k − 1)! (k − 3)! (n + 1)! (2k + 3n)!
f 0 (m, k) = 2 · (2k − 3)! (2m − 1)!
(k − 1)! (k − 3)! ( m−k 2 + 1)!
enumeration of polygons with m faces
F (m) = lg(
m
X
k≥3
f 0 (m, k)) ≈ 2.175m
3.24 bits/vertex= 1.62 bits/face < 2.17 bits/face
Enumeration and entropy of planar maps
Mesh compression
3D triangle meshes
VRML, 288 or 114 bits/vertex
[Touma Gotsman] ≈2bits/vertex (heuristic)
[Poulalhon Schaeffer] 3.24bits/vertex (optimal)
sim ple com pre ssion
[Edgebreaker] 3.67bits/vertex (guaranteed upper bound)
1101000110000010010000011001000000000 V 5 V 5 V 6 V 5 V 4 V 5 V 8 V 5 V 5 V 4 S 4 V 3 V 4
CCCRCCRCCRECRRELCRE PS
TG
EB impli cit enc odings
General underlying idea
Encoding strategies based on a local (global) conquest
3D triangle meshes
[Touma Gotsman] (1998)
[Poulalhon Schaeffer] (2003)
[Edgebreaker] (Rossignac ’99)
General underlying idea
Encoding strategies based on a local (global) conquest
3D triangle meshes
General underlying idea
Encoding strategies based on a local (global) conquest
3D triangle meshes
Graph encodings and spanning trees
Edgebreaker
CCCRCCRCCRECRRELCRE
C C C
R C
R C
C
C R
S C
R R L E
C E R
Canonical orderings and multiple parenthesis words
( [ [ [ ) ( ] ( ] ( ] [ [ [ ) [ ) ( ] ] [ ) . . .
V
5V
5V
6V
5V
4V
5V
8V
5V
5V
4S
4V
3V
4T ouma Gotsman(
098)
1101000110000010010000011001000000000
P oulalhon Schaef f er(2003)
No querie s
Chuang et al. (98) - Chiang et al. (01)
General visual framework (Isenburg Snoeyink)
Geometric data structures
Geometric data structures
Triangle meshes
struct triangle{
triangle *t1, *t2, *t3;
vertex *v1, *v2, *v3;
}
struct vertex{
triangle * root;
int label;
}
Connectivity
Geometry
struct point{
float x;
float y;
}
point vertex_geometry[max_label];
Polygonal meshes
struct edge{
edge * oppo;
edge * next;
edge * prev;
vertex * origin;
}
struct vertex{
edge * root;
int label;
}
struct point{
float x;
float y;
}
point vertex_geometry[max_label];