@@ -19,11 +19,11 @@ So we start with some `#include` and some `using` statements to define types.
19
19
20
20
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-include
21
21
22
- When we insert a set of points in the triangulation it stores a set of finite
22
+ When we insert a set of points in the triangulation, it generates a set of finite
23
23
vertices corresponding to the points, and the decomposition of the convex hull
24
- of the points in finite faces.
25
- Additionally, the triangulation stores infinite faces, which are incident to the edges of the convex hull
26
- and which hav as third vertex a single infinite vertex. When we draw the triangulation
24
+ of the points in finite triangular faces.
25
+ Additionally, the triangulation generates infinite faces, which are incident to the edges of the convex hull
26
+ and which have as third vertex a single infinite vertex. When we draw the triangulation
27
27
we only draw finite vertices and faces.
28
28
29
29
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-construction
@@ -32,15 +32,15 @@ FIGURE
32
32
33
33
We inserted a range of points from a `std::array` but the insert functions
34
34
can take any range type, e.g., a `std::vector` or `std::list`.
35
- When we inserted an individual point we obtained a <em>vertex handle</em> `vh`.
35
+ When we insert an individual point we obtained a <em>vertex handle</em> `vh`.
36
36
A handle is a pointer to a vertex object, and no surprise when we write
37
37
`v->point()` into `std::cout` we will see `1 1` on the console.
38
38
39
39
Just like the standard containers, the triangulation provides iterators to enumerate
40
40
its elements, that is either all or only the finite vertices and faces.
41
- When we iterate over all elements we offen have to check whether they
41
+ When we iterate over all elements we often have to check whether they
42
42
are finite. It makes no sense to access the point of the infinite
43
- vertex, or to to compute the area of an infinite face.
43
+ vertex, or to compute the area of an infinite face.
44
44
45
45
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-traversal
46
46
@@ -61,7 +61,7 @@ always three incident vertices, which we access in the nested `for`-loop.
61
61
The call `dt.incident_vertices()` returns a circulator over the one-ring
62
62
of a vertex. If you pass it a vertex on the convex hull, the infinite
63
63
vertex is in the one-ring. If you pass it the infinite vertex,
64
- you will circulate over the vertices on the convex hull.
64
+ you will circulate over the vertices of the convex hull.
65
65
66
66
Let's return to our vertex `vh` and its incident face `fh` and determine
67
67
the index of `vh` in `fh`. The index is either 0, 1, or 2, in counterclockwise
@@ -89,7 +89,7 @@ absolutely clear of what type a variable is.
89
89
90
90
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-noauto
91
91
92
- In a triangulation we also have edges. However they are just a `std::pair`
92
+ In a triangulation we also have <em> edges</em> . However, they are just a `std::pair`
93
93
and hold a face handle and an index. No surprise that the index is the one
94
94
of the vertex opposite to the edge. The `mirror()` function,
95
95
which for an edge returns the edge seen from the other side,
@@ -98,28 +98,29 @@ not equal.
98
98
99
99
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-edge
100
100
101
- The triangulation offers iterators to enumerate all edges
101
+ The triangulation offers iterators to enumerate all edges,
102
102
and circulators to enumerate the edges incident to a vertex.
103
103
104
104
We will next turn to <em>point location</em>, that is given a 2D point `p`
105
105
we want to determine where in the triangulation it is. The function
106
- returns a face handle. As the point may be on a
107
- vertex, on an edge inside a finite face, or outside the convex hull
108
- the function writes this information in the non-const parameter `lt` of type `Locate_type`.
106
+ returns a face handle we store in `fh`. The point may be on a
107
+ vertex of `fh`, on an edge of `fh`, inside `fh` in case it is a finite face,
108
+ or it may be outside the convex hull.
109
+ The function writes this information in the non-const parameter `lt` of type `Locate_type`.
109
110
And it additionally writes into the non-const parameter `li`, the locate index,
110
- the index of the vertex or edge in face `fh, in case `lt == Delaunay::VERTEX` or
111
- `lt == Delaunay::EDGE`. If `lt` is `Delaunay::FACE` or `Delaunay::OUTSIDE_CONVEX_HULL`
111
+ the index of the vertex or edge in face `fh, in case `lt`is ` Delaunay::VERTEX` or
112
+ `Delaunay::EDGE`. If `lt` is `Delaunay::FACE` or `Delaunay::OUTSIDE_CONVEX_HULL`
112
113
the locate index has no meaning.
113
114
114
115
115
116
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-locate
116
117
117
118
The function `Delaunay::locate()` has another optional parameter, namely a face
118
- from where to start the point location. Let's explain how point location works
119
+ from where to start the point location. Let's explain how point location works
119
120
to understand why the hint is important. Without the hint the algorithm starts
120
121
at an arbitrary vertex, and traverses faces in the direction of the query point.
121
122
So when you have query points which have some spatial coherence you better pass
122
- the result of a previous point location query as hint where to start for the next one.
123
+ the result of a previous point location query as hint where to start for the current one.
123
124
You might have a look at the function `hilbert_sort()` to learn more about what
124
125
we mean with spatial coherence.
125
126
0 commit comments