• Aucun résultat trouvé

Compact representations of geometric data structures

N/A
N/A
Protected

Academic year: 2022

Partager "Compact representations of geometric data structures"

Copied!
70
0
0

Texte intégral

(1)

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

(2)

Domain and motivations

(3)

Triangulations and graphs

Geometric data

Geometric modeling

Tetrahedral Volume Meshes 3D meshes

GIS Technology

Applications

Surface recontruction

(4)

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

(5)

Research topics

Mesh compression

Compact representations of geometric data structures Geometric data structures

i .. .

disk storage

Transmission

(6)

Compact representations

(7)

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

(8)

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

(9)

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

(10)

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

(11)

Could we do better?

a compact encoding (asymptotically optimal)

testing adjacency queries efficiently (in O(1) time)

(12)

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

(13)

Geometric data

Triangulations with a boundary

3-connected planar maps (polygonal meshes)

Triangulations of the sphere

(14)

Which information?

Geometry and connectivity

Geometric object

Geometric information

Combinatorial objetct

(15)

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

(16)

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

(17)

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

(18)

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

(19)

Mesh compression

(20)

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

(21)

General underlying idea

Encoding strategies based on a local (global) conquest

3D triangle meshes

[Touma Gotsman] (1998)

[Poulalhon Schaeffer] (2003)

[Edgebreaker] (Rossignac ’99)

(22)

General underlying idea

Encoding strategies based on a local (global) conquest

3D triangle meshes

(23)

General underlying idea

Encoding strategies based on a local (global) conquest

3D triangle meshes

(24)

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

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

T ouma Gotsman(

0

98)

1101000110000010010000011001000000000

P oulalhon Schaef f er(2003)

No querie s

Chuang et al. (98) - Chiang et al. (01)

General visual framework (Isenburg Snoeyink)

(25)

Geometric data structures

(26)

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];

Explicit representations

not succi nct enco dings

Θ( n lg n ) bits

(27)

Succinct encodings of graphs: existing works

(28)

planar graphs: book embeddings and canonical orderings

Succinct encodings of graphs: existing works

Codage 3-c. triang.

Jacobson 64n 64n

Munro Raman 8n + 2e 7m

Chuang et al. 2e + 2n 3.5m

Chiang et al. 2e + 2n 4m

Blandford et al. O(n) O(m)

()(( ())( ()(( ()) ()))(()))(())

( ) ( ( ( ) ) ( ) ( ) ) ( ) ( ( ) ) ( ) ( )

2 3

5 4 6 8 7

9 10

11

[[[[ ] ] ][[[ [ ]][ ]][[[[[ [ ]][ ]] ][ [ ]]][ ]]]]

1 2 3 4 3 5 6 7 8 9 10 11

G − T T

T G ([[[)(](][[[)])(]][) . . .

1.62m

Optimal bound

(29)

Our solution for succinctly representing graphs

(30)

Decomposition of quadrangulations...by the french artist L´ eon Gischia

First idea: decomposition

(1903-1991)

(31)

Literary digression (The lesson, Eug` ene Ionesco, 1951)

Second idea: precomputing and storing

le professeur: Ecoutez-moi, Mademoiselle, si vous n’arrivez pas ` a comprendre profond´ ement ces principes, ces arch´ etypes arithm´ etiques, vous n’arriverez jamais ` a faire correctement un travail de polytechnicien... Encore moins ne pourra-t-on vous charger d’un cours ` a l’Ecole polytechnique... combien font, par exemple, 3.755.918.261 multipli´ e par 5.162.303.508?

l’´ el` eve (tr` es vite) : ca fait 193891900145...

le professeur(de plus en plus ´ etonn´ e calcule mentalement): Oui... Vous avez raison... le produit est bien... (il bredouille inintelligiblement)... Mais com- ment le savez-vous, si vous ne connaissez pas les principes du raisonnement arithm´ etique?

During a private lesson, for preparing the total doctorate, a young student talks about arithmetics with her teacher

l’´ el` eve : C’est simple. Ne pouvant me fier ` a mon raisonnement, j’ai

appris par coeur tous les r´ esultats possibles de toutes les multiplications

possibles.

(32)

Our scheme

1 2 3

.. .

Level 1:

• Θ( n

log

2

n ) regions of size Θ(log 2 n), represented by pointers to level 2

Level 2:

in each of the n

log

2

n regions

• Θ(log n) regions of size C log n, represented by pointers to level 3

Level 3: exhaustive catalog of all different region of size i < C log n:

• complete explicit representation.

. . . . . .

Overview of the hierarchical structure

(33)

1 2 3

.. . . . . . . .

Our scheme

Level 3: exhaustive catalog of all different region of size i < C log n:

• complete explicit representation.

Overview of the hierarchical structure

Level 1:

• Θ( n

log

2

n ) regions of size Θ(log 2 n), represented by pointers to level 2

• global pointers of size log n

Level 2:

in each of the n

log

2

n regions

• Θ(log n) regions of size C log n, represented by pointers to level 3

• local pointers of size log log n

(34)

1 2 3

.. . . . .

. . . Dominant memory cost

Our scheme

Level 3: exhaustive catalog of all different region of size i < C log n:

• complete explicit representation.

Overview of the hierarchical structure

Level 1:

• Θ( n

log

2

n ) regions of size Θ(log 2 n), represented by pointers to level 2

• global pointers of size log n

Level 2:

in each of the n

log

2

n regions

• Θ(log n) regions of size C log n, represented by pointers to level 3

• local pointers of size log log n

(35)

Let us consider a triangulation of size m (with m faces)

Compact representations of graphs

(36)

micro triangulations of size between 1

4 lg m We decompose into sub triangulations of polylog size

1

12 lg m et

Compact representations of graphs

(37)

Graph of micro regions

G is a local planar map

graph G

O( log m m ) nodes graph G:

• a node for each micro region,

• an arc for each pair of adjacant micro regions

(38)

Sub-graph of micro regions

graph G i

O(log m) nodes G i is a sub-map of G containing O(lg m) micro triangulations

O(log 2 m) triangles

(39)

Graph of mini regions

graph F

O( log m

2

m ) nodes F est une carte planaire

graph F :

• a node for each mini region

• an arc for each pair de of adjacent mini regions

(40)

Asymptotic cost of the representation

(41)

O( log m m ) micro regions

Cost of graphs G and F

Our solution

(42)

O( log m m ) micro regions

graph G

O( log m m ) nodes

Because of Euler’s relation:

E (G) = O( m lg m )

G is local planar, having all faces of degree at least 3

Our solution

G is a sparse graph

(43)

We ue local pointers of size log log m for explicitly representing graphs G i graph G i

O( log m m log log m) bits X

i

kE (G i )k = O( m lg m ) graph G

O(log m) nodes

Our solution

(44)

Our solution

We can use pointers of size log m

graph F

O( log m

2

m log m) bits F is local planar and then sparse

O ( log m

2

m ) arcs

(45)

The catalog of all micro regions having at most r triangles ha negligible size

Cost of the catalog

kAk ≈ 2 1 4 2.175r ≤ 2 1 4 2.175 lg m

r 2.175 entropy of the

original class Exhaustive catalog of all different micro regions

Compact representations of graphs

(46)

The cost of a reference depends on the size of the catalog

Cost of references to the catalog

log 2 kAk = 2.175r bits

r

r triangles

Compact representations of graphs

2.175 entropy of the

original class

(47)

The dominant term is given by the sum of references to the catalog

P j 2.175r j = 2.175m bits

r

r triangles

Dominant term

Compact representations of graphs

2.175 entropy of the

original class

(48)

Compact representations of graphs

Theorem

For planar triangulations with m triangles there exists a compact rep- resentation, supporting local adjacency queries in O(1) time, which requires

2.175m + O(m lg lg m

lg m ) = 2.175m + o(m) bits

For higher genus g triangulations we have

2.175m + 36(g − 1) lg m + O(m lg lg m

lg m + g lg lg m) bits

(Castelli Aleardi, Devillers et Schaeffer, WADS05)

(49)

Compact repreentations of graphs

kAk ≈ 2 1 4 2.175r

log 2 kAk = 2.175r bits

1.62m is the entropy of the original class No assumptions on the size of the boundaries

P

j 2.175r j = 2.175m bits

(50)

Is it possible to achieve optimality?

(51)

Repr´ esentations succinctes

kAk = ?

log 2 kAk = ? bits

A more clever decompoition strategy

1.62m entropy of the original class

a smaller catalog

(52)

Succincts representations

kAk << 2 2.175r

More clever decomposition strategy... using ”canonical” spanning trees

We count in term of vertices

A smaller catalog

1.62m is the entropy of the original class

We decompose into micro trees

(53)

Succinct planar maps

Theorem

For some classes of planar maps (triangulations and 3-connected pla- nar maps) there exists an optimal succinct representation, supporting navigation in O(1) time. The memory cost matches asymptotically the entropy:

• 1.62m bits, for triangulations of the sphere with m faces;

• 2e bits, for 3-connected graphs with e edges.

(Castelli Aleardi, Devillers et Schaeffer, SoCG06)

(54)

Planar maps and trees

(planar triangulations, Poulalhon et Schaeffer 2003)

(3-connected planar maps, Fusy Poulalhon et Schaeffer 2005)

n + 2 nodes n nodes

exactly 2 stems per node

3-connected planar graph quadrangulation binary tree

minimal realizer (Schnyder ’90)

(55)

A new local closure operation

1101000100000000000 1001010000

1 1 1

1

0

0

0 0 0

0 0 0

0

0 0

0 0

(56)

A better decompoition strategy

(57)

kA r k = k P w A r,w k

kA r,w k = 2 3.24r · 2r w

3.24r + w lg r bits

cost of a reference

3.24n ou 1.62m entropy of the original class

memory cost: dominant term

(58)

3.24n ou 1.62m entropy of the original class

memory cost: dominant term

P

j 3.24r i + w i lg r i = 3.24n + o(n) bits overall cost of pointers P

i w i = O( lg n n ) P

i r i ≈ n

(59)

Compact representations of graphs

Comparison of existing results

Encoding queries 3-connected triangl.

Jacobson (Focs89) O(lg n) 64n 64n

Munro Raman (Focs97) O(1) 8n + 2e 7m

Chuang et al. (Icalp98) O(1) 2e + 2n 3.5m

Chiang et al. (Soda01) O(1) 2e + 2n 4m

Blandford et al. (Soda03) O(1) O(n) O(m)

Castelli et al. (Wads05 Cccg05) O(1) no 2.175m

Castelli et al. (SoCG06) O(1) 2e 1.62m

(60)

A dynamic representation

(61)

Succinct dynamic triangulations

theorem

For triangulations with a boundary having m faces, it is possible to maintain a succinct representation under insertion/deletion of vertices and edge flips, while supporting local navigation in O(1) time. The size of the representation is still asymptotically optimal:

2.175m + o(m) bits The cost for an update is:

• O(1) amortized for the vertex insertion;

• O(lg 2 m) amortized time for vertex deletion and edge flip.

(Castelli Aleardi, Devillers et Schaeffer, CCCG05)

(62)

• more efficient decomposition strategies

G i

B 0

B 00

T T ij T T

ij

0

T T ij

00

ST i

Succinct dynamic triangulations

(63)

And in practice?

2.175m + 36(g − 1) lg m + O(m lg lg m

lg m + g lg lg m) bits

(64)

A practical implementation

(joint work with Abdelkrim Mebarki, CCCG06)

1

12 log m to 1 4 log m

Catalog

8 references/quadrangle

gain 9/13

usual structure

6 references to triangles

1 reference/vertex

(65)

And the geometry?

(66)

External geometric data

lg n bits

lg n bits

lg lg n bits

multiple nodes

too many multiple references

(67)

future work

(68)

Representing labelled structures (in preparation)

(joint work with Jeremy Barbay, Meng He and Ian Munro)

Goal: efficient dealing with additional attributes associated to elementary cells of the mesh

Example: vertex coordinates, face colors and

normals, additional tags, ...

(69)

Representing labelled structures (in preparation)

(joint work with Jeremy Barbay, Meng He and Ian Munro)

0

2

1

3 5 4 6 7

8

9 10

11

4 3 0 2 5 6 7

8 9 10

1 0

1 3 2

5 4

6 7 8

9 )

(

( [ [ [ [ ( ( ( ] ] ] { [ [ ) )( { } ] { )( } ] { [ [ [ [ ) )( { } ] { ) ( } ] ] ( ) )( { { }} ] { )( } }} ] ))

1 2 3 4 5 6 8 9 10 11

0 1 4 3 7

S

11 4 3 2 6 5 10 9 8 7 2 3 4

1 6 7 8 9 10

π 1 11 4 3 2 6 10 9 8 7 2 3 4

1 5 6 7 8 9 10

π 1 4 6 10 9 8 7 2 5 3

2 3 4

1 5 6 7 8 9

π 2

Main idea: find good orders on the vertices of a graph Solution Combinatorial properties of

planar graphs

labelled trees

+

(70)

• Extension to higher genus surfaces

Future work

• Volume meshes Encoding the geometry

?

Références

Documents relatifs

Marckert and Miermont (2006) show that similar results as in Chassaing and Schaeffer (2004); Le Gall (2006); Marckert and Mokkadem (2006) hold for rooted and pointed bipartite

Most geometric algorithms require data structures which are easy to implement, allowing fast navigation between mesh elements (edges, faces and vertices), as well as efficient

Munro and Raman [10] achieve O(1) time for adjacency between vertices and degree queries: for planar triangulations with e edges and n vertices only 2e + 8n bits are

The graph G used to describe adjacency relations between tiny quadran- gulations is a planar map (each tiny quadrangulation is a connected planar map, whose edges may be incident

Unité de recherche INRIA Rennes : IRISA, Campus universitaire de Beaulieu - 35042 Rennes Cedex (France) Unité de recherche INRIA Rhône-Alpes : 655, avenue de l’Europe - 38334

For planar maps (triangulations and 3 -connected graphs) it is possible to design two optimal succinct representations, supporting efficient navigation in O (1) time, whose

For planar maps (triangulations and 3 -connected graphs) it is possible to design two optimal succinct representations, supporting efficient navigation in O (1) time, whose

We provide generating functions for the number of equivalence classes of rooted planar maps where two maps are equivalent when- ever their representations in shuffles of Dyck