Skip to content

Commit f34a336

Browse files
committed
wording
1 parent 6a9eb6d commit f34a336

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

Documentation/doc/Documentation/Tutorials/Tutorial_triangulation_2.txt

+18-17
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ So we start with some `#include` and some `using` statements to define types.
1919

2020
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-include
2121

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
2323
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
2727
we only draw finite vertices and faces.
2828

2929
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-construction
@@ -32,15 +32,15 @@ FIGURE
3232

3333
We inserted a range of points from a `std::array` but the insert functions
3434
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`.
3636
A handle is a pointer to a vertex object, and no surprise when we write
3737
`v->point()` into `std::cout` we will see `1 1` on the console.
3838

3939
Just like the standard containers, the triangulation provides iterators to enumerate
4040
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
4242
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.
4444

4545
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-traversal
4646

@@ -61,7 +61,7 @@ always three incident vertices, which we access in the nested `for`-loop.
6161
The call `dt.incident_vertices()` returns a circulator over the one-ring
6262
of a vertex. If you pass it a vertex on the convex hull, the infinite
6363
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.
6565

6666
Let's return to our vertex `vh` and its incident face `fh` and determine
6767
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.
8989

9090
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-noauto
9191

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`
9393
and hold a face handle and an index. No surprise that the index is the one
9494
of the vertex opposite to the edge. The `mirror()` function,
9595
which for an edge returns the edge seen from the other side,
@@ -98,28 +98,29 @@ not equal.
9898

9999
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-edge
100100

101-
The triangulation offers iterators to enumerate all edges
101+
The triangulation offers iterators to enumerate all edges,
102102
and circulators to enumerate the edges incident to a vertex.
103103

104104
We will next turn to <em>point location</em>, that is given a 2D point `p`
105105
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`.
109110
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`
112113
the locate index has no meaning.
113114

114115

115116
\snippet Triangulation_2/Tutorial_Triangulation_2.cpp TutoT2-locate
116117

117118
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
119120
to understand why the hint is important. Without the hint the algorithm starts
120121
at an arbitrary vertex, and traverses faces in the direction of the query point.
121122
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.
123124
You might have a look at the function `hilbert_sort()` to learn more about what
124125
we mean with spatial coherence.
125126

Triangulation_2/examples/Triangulation_2/Tutorial_Triangulation_2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int main ()
8484

8585

8686
//! [TutoT2-locate]
87-
auto loc = dt.locate(Point(1, 1));
87+
fh = dt.locate(Point(1, 1));
8888
//! [TutoT2-locate]
8989

9090
return 0;

0 commit comments

Comments
 (0)