Skip to content

Commit 9196eaa

Browse files
authored
doc: update content of the book (#485)
The content and illustrations come from my PhD manuscript.
1 parent 348e54b commit 9196eaa

35 files changed

Lines changed: 12830 additions & 484 deletions

user-guide/book.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ title = "The Honeycomb Book"
66

77
[output.html]
88
site-url = "/honeycomb/"
9+
mathjax-support = true

user-guide/src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- [Components](./definitions/components.md)
99
- [Cell representation](./definitions/cells.md)
1010
- [Embedding](./definitions/embedding.md)
11-
- [Element insertion and deletion](./definitions/insertion.md)
11+
- [Element insertion and deletion](./definitions/ops.md)
1212
- [Sewing operation](./definitions/sews.md)
1313
- [Transactional memory](./definitions/stm.md)
1414
- [Resources]()
Lines changed: 56 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,72 @@
11
# Cell representation
22

3-
**This content has been copy-pasted from the previous guide. It is up-to-date but should be improved
4-
at some point.**
5-
63
---
74

8-
We define orbits as a set of darts that are accessible from a given dart,
9-
using a certain set of beta functions. For example:
5+
## Orbits
106

11-
- *⟨β<sub>1</sub>⟩(d)* refers to all darts accessible from *d* using
12-
*β<sub>1</sub>* recursively any number of times.
13-
- *⟨β<sub>1</sub>, β<sub>3</sub>⟩(d)* refers to all darts accessible
14-
from *d* using any combination of *β<sub>1</sub>* and *β<sub>3</sub>*.
7+
<figure style="text-align:center">
8+
<img src="../images/2map.svg" alt="MapMeshEquivalent" width=100%/>
9+
<figcaption><i>2-map example and its components values.</i></figcaption>
10+
</figure>
1511

16-
## *i*-cells
12+
In our \\(2\\)-map example, applying \\(\beta_1\\) recursively to \\(d_1\\) makes us cycle through
13+
darts \\(d_1\\), \\(d_2\\), \\(d_3\\), that belong to different edges. Applying \\(\beta_2\\)
14+
to \\(d_6\\) makes us cycle between \\(d_6\\) and \\(d_8\\), both belonging to different faces.
15+
This set of darts accessible from a starting dart via a given \\(\beta_i\\) function is called
16+
**orbit**.
1717

18-
A specific subset of orbits, referred to as *i*-cells are defined and often
19-
used in algorithms. The general definition is the following:
18+
> **Definition**: Orbit
19+
>
20+
> We call **orbit of \\(d\\) by \\( \lbrace f_1, f_2, ..., f_k \rbrace \\) and denote
21+
> \\( \langle f_1, f_2, ..., f_k \rangle (d)\\)** the set of darts retrievable from \\(d\\) using
22+
> any composition of \\(f_1, f_2, ..., f_k\\), including recursions. In other words,
23+
> \\( \langle f_1, f_2, ..., f_k \rangle (d)\\) refers to the set of darts connected to
24+
> \\(d\\), via the \\(f_1, f_2, ..., f_k\\) functions.
25+
>
26+
> The set is obtained by doing a Breadth First Search algorithm from the starting dart \\(d\\),
27+
> where each connected node is the image of the current dart via one function
28+
> \\(f \in \lbrace f_1, f_2, ..., f_k \rbrace\\). The order in which nodes are explored is
29+
> determined by the order of the function set.
2030
21-
- **if i = 0**: *0-cell(d) = ⟨{ β<sub>j</sub> o β<sub>k</sub> with 1 ≤ j < k ≤ N }⟩(d)*
22-
- **else**: *i-cell(d) = ⟨β<sub>1</sub>, β<sub>2</sub>, ..., β<sub>i-1</sub>, β<sub>i+1</sub>, ..., β<sub>N</sub>⟩(d)*
31+
For example, the orbit \\(\langle \beta _2 \rangle (d)\\) refers to the subset of unique darts
32+
accessible from dart \\(d\\) using any composition of \\(\beta_2\\), including recursive ones.
33+
The orbit \\(\langle \beta_1, \beta_0 \rangle (d_7)\\) refers to darts accessible from dart
34+
\\(d_7\\) using any composition of \\(\beta_1\\) and \\(\beta_0\\). The computation process is
35+
detailed below.
2336

24-
In our case, we can use specialized definitions for our dimensions:
37+
<figure style="text-align:center">
38+
<img src="../images/orbit-bfs.svg" alt="OrbitComputationProcess" width=100%/>
39+
<figcaption><i>Orbit computation BFS.</i></figcaption>
40+
</figure>
2541

26-
| *i* | Geometry | 2-map | 3-map |
27-
|-----|----------|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
28-
| 0 | Vertex | *⟨β<sub>1</sub> o β<sub>2</sub>⟩(d)* <br> **or** <br> *⟨β<sub>2</sub> o β<sub>-1</sub>⟩(d)* | *⟨β<sub>3</sub> o β<sub>2</sub>, β<sub>1</sub> o β<sub>3</sub>⟩(d)* <br> **or** <br> *⟨β<sub>3</sub> o β<sub>2</sub>, β<sub>3</sub> o β<sub>-1</sub>⟩(d)* |
29-
| 1 | Edge | *⟨β<sub>2</sub>⟩(d)* | *⟨β<sub>2</sub>, β<sub>3</sub>⟩(d)* |
30-
| 2 | Face | *⟨β<sub>1</sub>⟩(d)* | *⟨β<sub>1</sub>, β<sub>3</sub>⟩(d)* |
31-
| 3 | Volume | - | *⟨β<sub>1</sub>, β<sub>2</sub>⟩(d)* |
42+
## \\(i\\)-cells
3243

33-
## Examples
44+
Specific values of orbits can be used to define the cells commonly used in meshing algorithms.
45+
These specific values are referred to as \\(i\\)-cells. For example the subset of dart defined by
46+
\\( \langle \beta_1 \rangle (d)\\) corresponds to darts of a face, i.e., a \\(2\\)-cell. The subset
47+
of dart defined by orbit \\( \langle \beta_2 \rangle (d)\\) corresponds to darts of an edge, i.e.,
48+
a \\(1\\)-cell.
3449

3550
<figure style="text-align:center">
36-
<img src="../images/bg_orbit_face.svg" alt="Embed" />
37-
<figcaption>
38-
<i>2-cell (face) associated to d<sub>2</sub>;
39-
Note that the 2-faces of d<sub>1</sub>, d<sub>3</sub>, d<sub>4</sub> are the same
40-
</i></figcaption>
51+
<img src="../images/icells.svg" alt="iCells" width=100%/>
52+
<figcaption><i>0-cell, 1-cell, and 2-cell of d<sub>3</sub>.</i></figcaption>
4153
</figure>
4254

43-
<figure style="text-align:center">
44-
<img src="../images/bg_orbit_edge.svg" alt="Embed" />
45-
<figcaption><i>1-cell (edge) associated to d<sub>2</sub></i></figcaption>
46-
</figure>
55+
> **Definition**: \\(0\\)-cell
56+
>
57+
> Let \\(d \in D\\). The \\(0\\)-dimensional cell associated to dart \\(d\\) is
58+
> \\( \langle { \beta_j \circ \beta_k, 1 \le j < k \le N } \rangle (d)\\).
4759
48-
<figure style="text-align:center">
49-
<img src="../images/bg_orbit_vertex.svg" alt="Embed" />
50-
<figcaption><i>0-cell (vertex) associated to d<sub>7</sub></i></figcaption>
51-
</figure>
60+
> **Definition**: \\(i\\)-cell, \\(i \ne 0\\)
61+
>
62+
> Let \\(d \in D\\). The \\(i\\)-dimensional cell associated to dart \\(d\\) is
63+
> \\(\langle \beta _1, ..., \beta _{i-1}, \beta _{i+1}, ..., \beta _N \rangle (d)\\).
64+
65+
Our interest lies in mesh representation, so we use these definitions applied to dimension 2 and 3.
66+
67+
| *i* | Geometry | 2-map | 3-map |
68+
|-----|----------|--------------------------------------------------|------------ -------------------------------|
69+
| 0 | Vertex | \\( \langle \beta_1 \circ \beta_2 \rangle (d)\\) | \\(\langle \beta_1 \circ \beta_2, \beta_1 \circ \beta_3, \beta_2 \circ \beta_3 \rangle (d)\\) |
70+
| 1 | Edge | \\(\langle \beta_2 \rangle (d)\\) | \\(\langle \beta_2, \beta_3 \rangle (d)\\) |
71+
| 2 | Face | \\(\langle \beta_1 \rangle (d)\\) | \\(\langle \beta_1, \beta_3 \rangle (d)\\) |
72+
| 3 | Volume | - | \\(\langle \beta_1, \beta_2 \rangle (d)\\) |
Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,25 @@
11
# Combinatorial maps
22

3-
**This content has been copy-pasted from the previous guide. It is up-to-date but should be improved
4-
at some point.**
5-
63
---
74

8-
## Definition
9-
10-
### Maps
11-
12-
N-dimensional combinatorial maps, noted *N-map*, are objects made up of
13-
two main elements:
14-
15-
- A set of darts, darts being the smallest elements making up the map
16-
- N beta functions, linking the darts of the map
17-
18-
Additionally, we can define *embedded data* as spatial anchoring of the
19-
darts making up the map. While the first two elements hold topological
20-
information, embedded data gives information about the "shape" of the
21-
map (e.g. vertices position in a spatial domain).
5+
Combinatorial maps are combinatorial, graph-like, data structures which can be seen as the
6+
formalization of half-edges to higher dimensions. They can be used in dimension two and three for
7+
mesh representation, including both surface and volume 3D meshing.
228

23-
With these elements, we can represent and operate on meshes.
24-
25-
## Example
26-
27-
Operations on a combinatorial map can affect its topology, shape or both:
9+
Roughly speaking, a map is simply a set of abstract elements, called darts, augmented with functions defined on this set of darts, which describe topological relations between them. This section
10+
presents the notions useful to understand maps, as they are the mai structure offered by the
11+
library.
2812

2913
<figure style="text-align:center">
30-
<img src="../images/bg_hcmap_example.svg" alt="MapMeshEquivalent" />
31-
<figcaption><i>Core crate quickstart example</i></figcaption>
14+
<img src="../images/meshmap.svg" alt="MapMeshEquivalent" width=70%/>
15+
<figcaption><i>Simple 2D mesh and its map representation.</i></figcaption>
3216
</figure>
3317

34-
The specifics on how data is encoded is detailed in attribute-specific
35-
sections.
18+
All of the definitions we present in this section are based on G. Damiand and P. Lienhardt
19+
_Combinatorial Maps: Efficient Data Structures for Computer Graphics and Image Processing_;
20+
The reader may refer to this book for more details.
3621

22+
<figure style="text-align:center">
23+
<img src="../images/3meshmap.svg" alt="MapMeshEquivalent" width=100%/>
24+
<figcaption><i>Simple 3D mesh and its map representation.</i></figcaption>
25+
</figure>

user-guide/src/definitions/components.md

Lines changed: 58 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,81 @@
11
# Components
22

3-
**This content has been copy-pasted from the previous guide. It is up-to-date but should be improved
4-
at some point.**
5-
63
---
74

8-
## Darts
5+
## Preliminary notions
96

10-
Darts are the finest grain composing combinatorial maps. The structure of the map is given by the relationship between
11-
darts, defined through beta functions. Additionally, a null dart is defined, we denote it **.
7+
Let \\(F, G\\) be finite sets of elements. Let \\(f\\) an application defined on \\(F\\) to \\(G\\).
128

13-
In our implementation, darts exist implicitly through indexing and their associated data. There are no dart *objects*
14-
in a strict sense, there is only a given number of dart, their associated data ordered by an array-like logic, and a
15-
record of "unused" slots that can be used for dart insertion. Because of this, we assimilate dart and dart index.
9+
> **Definition**: Permutation
10+
>
11+
> \\(f: F \rightarrow G\\) is a **permutation** if and only if \\(f\\) is a bijection and
12+
> \\(F = G\\), i.e.,\\(f\\) is a one-to-one mapping from \\(F\\) to \\(F\\).
1613
17-
## Beta functions
14+
> **Definition**: Involution
15+
>
16+
> \\(f: F \rightarrow F\\) is an **involution** if it is a permutation and is its own inverse, i.e.,
17+
> \\(f\\) is a one-to-one mapping from \\(F\\) to \\(F\\), and \\(f = f^{-1}\\).
1818
19-
Each combinatorial map of dimension *N* defines *N* beta functions linking the set of darts together (e.g. a 2-map
20-
contains *β<sub>1</sub>* and *β<sub>2</sub>*). These functions model the topology of the map, giving information about
21-
connections of the different cells of the map / mesh. In our case, we mostly use:
19+
Let \\(\emptyset\\) denote a null element. Let \\(F' = F \cup { \emptyset }\\).
2220

23-
- *β<sub>1</sub>*, a (partial) permutation,
24-
- *β<sub>2</sub>*, *β<sub>3</sub>*, two (partial) involutions
2521

26-
Additionally, we define *β<sub>0</sub>* as the inverse of *β<sub>1</sub>*, i.e. *β<sub>0</sub>(β<sub>1</sub>(d)) = d*.
27-
This comes from a practical consideration for performances and efficiency of the implementation.
22+
> **Definition**: Partial permutation
23+
>
24+
> \\(f': F' \rightarrow F'\\) is a **partial permutation** if \\(f'(\emptyset) = \emptyset\\) and
25+
> \\(\forall x,y \in F, f'(x) = f'(y) \ne \emptyset \Rightarrow x = y\\).
2826
29-
The *β<sub>i</sub>* functions can be interpreted as navigation functions along the *i-th* dimensions: *β<sub>1</sub>*
30-
makes you navigate along the edges, *β<sub>2</sub>* along the faces, etc. This can be generalized to *N* dimensions,
31-
but we are only interested in 2D and 3D at the moment.
27+
> **Definition**: Partial involution
28+
>
29+
> \\(f': F' \rightarrow F'\\) is a partial involution if it is a partial permutation and
30+
> \\(\forall x \in F, f'(x) = \emptyset\\) or \\(f'(x) \ne \emptyset \Rightarrow f'(f'(x)) = x\\).
3231
33-
### Properties
32+
## Combinatorial maps
3433

35-
For a given dart *d*, we define two properties:
34+
Let \\( N \in \mathbb{N} \\). An \\(N\\)-dimensional map is defined as follows:
3635

37-
- *d* is ***i*-free** if *β<sub>i</sub>(d) = ∅*, ** being the null dart
38-
- *d* is **free** if it is ***i*-free for all *i***
36+
> **Definition**: Combinatorial map
37+
>
38+
> \\(N\\)-dimensional combinatorial maps, or \\(N\\)-maps, are an \\((N+1)\\)-tuple
39+
> \\((D, \beta_1, ..., \beta_N)\\) such that:
40+
>
41+
> - \\(D = \lbrace d_i \rbrace_i\\) is a finite set of darts,
42+
> - \\(\forall j \in [ 1; N ], \beta_j\\) is a function from \\(D\\) to \\(D\\) defining
43+
> topology of the space.
3944
40-
## Construction Example
45+
### Darts
4146

42-
<figure style="text-align:center">
43-
<img src="../images/bg_darts.svg" alt="Embed" />
44-
<figcaption><i>Start from unorganized darts</i></figcaption>
45-
</figure>
47+
Darts are the finest grain composing combinatorial maps. The structure of the map is given by the
48+
relationship between darts, defined through beta functions. Additionally, a null dart is defined,
49+
we denote it \\(d_0 = \emptyset\\).
4650

47-
<figure style="text-align:center">
48-
<img src="../images/bg_beta1.svg" alt="Embed" />
49-
<figcaption><i>Organize those using β<sub>1</sub></i></figcaption>
50-
</figure>
51+
In our implementation, darts exist implicitly through indexing and their associated data. There are
52+
no dart *objects* in a strict sense, there is only a given number of dart, their associated data
53+
stored using arrays, and a record of "unused" slots that can be used for dart insertion.
54+
Because of this, we assimilate dart and dart index.
55+
56+
### Beta functions
57+
58+
Each combinatorial map of dimension *N* defines *N* beta functions linking the set of darts
59+
together. These functions model the topology of the map, giving information about connections of
60+
the different cells of the mesh. They verify the following properties:
61+
62+
- \\(\beta_1\\) is a partial permutation on \\(D\\).
63+
- \\(\forall i \ge 2, \beta_i\\) is a partial involution on \\(D\\).
64+
- \\(\forall i \in [1;N-2], \forall j \in [i+2; N], \beta_i \circ \beta_j\\) is a partial
65+
involution on \\(D\\).
66+
67+
Additionally, we define \\(\beta_0\\) as the inverse of \\(\beta_1\\).
68+
This comes from a practical consideration for performances and efficiency of the implementation.
69+
70+
## Examples
5171

5272
<figure style="text-align:center">
53-
<img src="../images/bg_beta2.svg" alt="Embed" />
54-
<figcaption><i>Add β<sub>2</sub> images; For details on vertices, refer to the Embedding section</i></figcaption>
73+
<img src="../images/2map.svg" alt="MapMeshEquivalent" width=100%/>
74+
<figcaption><i>2-map example and its components values.</i></figcaption>
5575
</figure>
5676

5777
<figure style="text-align:center">
58-
<img src="../images/bg_map.svg" alt="Embed" />
59-
<figcaption><i>Build up a larger map</i></figcaption>
78+
<img src="../images/3map.svg" alt="MapMeshEquivalent" width=80%/>
79+
<img src="../images/components.svg" alt="MapMeshEquivalent" width=100%/>
80+
<figcaption><i>3-map example and its components values.</i></figcaption>
6081
</figure>
61-

0 commit comments

Comments
 (0)