From 60cfa183014f7810d3a82e4fb1c1a468454be97b Mon Sep 17 00:00:00 2001 From: "Maxime Chupin (escudo)" Date: Sun, 27 Nov 2016 22:53:44 +0100 Subject: [PATCH] Doc: correction anglais Nicole --- doc/luamesh-doc.tex | 113 +++++++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 49 deletions(-) diff --git a/doc/luamesh-doc.tex b/doc/luamesh-doc.tex index 98701ec..57ba342 100644 --- a/doc/luamesh-doc.tex +++ b/doc/luamesh-doc.tex @@ -172,14 +172,14 @@ \maketitle \begin{abstract} - The package \Verb|luamesh| allows to compute and draw 2D triangulation - of Delaunay. The algorithm is written with lua, and depending of the - choice of the ``engine'', the draw is done by MetaPost (with + The package \Verb|luamesh| allows to compute and draw 2D Delaunay + triangulation. The algorithm is written with lua, and depending on the + choice of the ``engine'', the drawing is done by MetaPost (with \Verb|luamplib|) or by \Verb|tikz|. The Delaunay triangulation algorithm is the Bowyer and Watson algorithm. Several macros are provided to draw the global mesh, the - set of points, a particular step of the algorithm. + set of points, or a particular step of the algorithm. \end{abstract} I would like to thank Jean-Michel Sarlat, who hosts the development @@ -187,14 +187,14 @@ with a git project on the \Verb+melusine+ machine: \begin{center} \url{https://melusine.eu.org/syracuse/G/delaunay/} \end{center} -Then, I would like to thank the first user, an intensive +I would also like to thank the first user, an intensive \emph{test} user, and a very kind English corrector: Nicole Spillane. \section{Installation} Of course, you can just put the two files \Verb+luamesh.lua+ and -\Verb+luamesh.sty+ in the working directory, but it is not +\Verb+luamesh.sty+ in the working directory, but this is not recommended. @@ -207,7 +207,7 @@ To install \luamesh with \TeX live, you have to create the local mkdir ~/texmf \end{commandshell} -Then we have to files to place in the correct directories. First, the +Then place the files in the correct directories. First, the \Verb+luamesh.sty+ file must be in the directory: \begin{center} \Verb+~/texmf/tex/latex/luamesh/+ @@ -244,7 +244,7 @@ If you want to use this package, you must compile your document with \subsection{Dependencies} -This package is built upon two main packages to draw the +This package is built upon two main existing packages to draw the triangulations : \begin{enumerate} \item \Verb+luamplib+ to use MetaPost via the \luatex library @@ -270,7 +270,7 @@ dimensional triangulations (or meshes). \commande|\buildMeshBW[«options»]{«list of points» or «file name»}|\medskip -This macro produce the Delaunay triangulation (using the Bowyer and +This macro produces the Delaunay triangulation (using the Bowyer and Watson algorithm) of the given \meta{list of points}. The list of points must be given in the following way : \begin{center} @@ -286,7 +286,7 @@ points must be given in the following way : There are several options to customize the drawing. \begin{optionsenum} \item[mode = int (default) \textme{or} ext:] this option allows to - use either the previously described set of point in the argument, or + use either the previously described set of points in the argument, or a file, containing, line by line (2 columns), the points. Such a file looks like : \begin{verbatim} @@ -300,7 +300,8 @@ xn yn added points to form a \emph{bounding box}\footnote{The bounding box is defined by four points place at 15\% around the box defined by $(x_{\min},y_{\min})$, $(x_{\min},y_{\max})$, - $(x_{\max},y_{\max})$, and $(x_{\min},y_{\max})$.} and the corresponding + $(x_{\max},y_{\max})$, and $(x_{\min},y_{\max})$. It is used by + the algorithm and will be computed in any case.} and the corresponding triangulation. By default, these triangles are removed at the end of the algorithm. \item[color = \meta{value} (default: black):] The color of the @@ -309,18 +310,18 @@ xn yn drawing for the elements (points and triangles) belonging to the bounding box. \item[print = none (default) \textme{or} points:] To label the vertices of the - triangulations with an adding dot. + triangulation. This also adds a \emph{dot} at each vertex. \item[meshpoint = \meta{value} (default: P):] The letter(s) used to - label the vertices of the triangulation. It is include in the math + label the vertices of the triangulation. It is included in the math mode delimiters \Verb+$...$+. The bounding box points are labeled - with a star exponent, and numbered from 1 to 4. + with numbers 1 to 4 and with a star exponent. \item[tikz (boolean, default:false):] By default, this boolean is set to \Verb+false+, and MetaPost (with \Verb+luamplib+) is used to draw - the picture. With this option, it is \Verb+tikz+ the \textit{drawing + the picture. With this option, \Verb+tikz+ becomes the \textit{drawing engine}. \item[scale = \meta{value} (default: 1cm):] The scale option defines - the scale at which the picture is draw (the same for the two - axis). It must contain the unit of length (cm, + the scale at which the picture is drawn (the same for both + axes). It must contain the unit of length (cm, pt, etc.). \end{optionsenum} @@ -349,10 +350,11 @@ file \Verb+mesh.txt+: \end{Exemple} \begin{warning} -The drawing engine is not here very relevant. But it is useful to -understand how the drawing is made. However, the engine will make sens -for the so called \emph{inc} macros (section~\ref{sec:inc}), where we -will be allowed to add code before and after the generated one by +The drawing engine is not very relevant here, but it is useful to +understand how the drawing is made. However, the engine will be +relevant to +the so called \emph{inc} macros (section~\ref{sec:inc}), for adding +code before and after the one generated by \luamesh. \end{warning} @@ -360,10 +362,10 @@ will be allowed to add code before and after the generated one by \commande|\drawPointsMesh[«options»]{«list of points» or «file name»}|\medskip -With the \Verb+\drawPointsMesh+, we plot the set of the points from -which the Browyer and Watson algorithm compute the triangulation. +With the \Verb+\drawPointsMesh+, we plot the set of (user chosen) points from +which the Bowyer and Watson algorithm computes the triangulation. -The use of this macro is quite similar to the +The use of this macro is quite similar to \Verb+\buildMeshBW+. Here is an example of the basic uses. \begin{Exemple} \drawPointsMesh{(0.3,0.3);(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5)} @@ -372,11 +374,11 @@ The use of this macro is quite similar to the \subsubsection{The Options} -There are several options (exactly the same that for the -\Verb+\buildMeshBW+)to customize the drawing. +There are several options (exactly the same as for the +\Verb+\buildMeshBW+) to customize the drawing. \begin{optionsenum} \item[mode = int (default) \textme{or} ext:] this option allows to - use either the previously described set of point in the argument, or + use either the previously described set of points as the argument, or a file, containing, line by line (2 columns), the points. Such a file looks like : \begin{verbatim} @@ -390,25 +392,26 @@ xn yn added points to form a \emph{bounding box} and the corresponding triangulation. By default, these triangles are removed at the end of the algorithm. \emph{Here, because we plot only the vertices of the - mesh, there is no triangles, but only dots.} + mesh, there are no triangles, only dots.} \item[color = \meta{value} (default: black):] The color of the drawing. \item[colorBbox = \meta{value} (default: black):] The color of the drawing for the elements (points and triangles) belonging to the bounding box. \item[print = none (default) \textme{or} points:] To label the vertices of the - triangulations with an adding dot. Without label, there is a dot. + triangulation. This also adds a \emph{dot} at each vertex. Without + label, there is still the dot. \item[meshpoint = \meta{value} (default: P):] The letter(s) used to - label the vertices of the triangulation. It is include in the math + label the vertices of the triangulation. It is included in the math mode delimiters \Verb+$...$+. The bounding box points are labeled - with a star exponent, and numbered from 1 to 4. + with numbers 1 to 4 and with a star exponent. \item[tikz (boolean, default:false):] By default, this boolean is set to \Verb+false+, and MetaPost (with \Verb+luamplib+) is used to draw - the picture. With this option, it is \Verb+tikz+ the \textit{drawing + the picture. With this option, \Verb+tikz+ becomes the \textit{drawing engine}. \item[scale = \meta{value} (default: 1cm):] The scale option defines - the scale at which the picture is draw (the same for the two - axis). It must contain the unit of length (cm, + the scale at which the picture is drawn (the same for both + axes). It must contain the unit of length (cm, pt, etc.). \end{optionsenum} With the same external mesh point file presented in @@ -432,11 +435,11 @@ section~\ref{sec:buildMesh}, we illustrate the different options. \commande|\meshAddPointBW[«options»]{«list of points» or «file name»}{«point» or «number of line»}|\medskip -This command allows to plot the different step of the addition of a -point in a Delaunay triangulation, using the Bowyer and Watson +This command allows to plot the steps within the addition of a +point in a Delaunay triangulation, by the Bowyer and Watson algorithm. -This macro produce the Delaunay triangulation (using the Bowyer and +This macro produces the Delaunay triangulation (using the Bowyer and Watson algorithm) of the given \meta{list of points} and shows a step of the algorithm when the \meta{point} is added. The list of points must be given in the following way: @@ -447,14 +450,15 @@ and the point is of the form \verb+(x,y)+. The \meta{file name} and \meta{number of line} will be explained in the option description. -One can use the macro as fallow: +One can use the macro as fallows: \begin{Exemple} \meshAddPointBW[step=badtriangles]{(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5)}{(2.2,1.8)} \meshAddPointBW[step=cavity]{(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5)}{(2.2,1.8)} \meshAddPointBW[step=newtriangles]{(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5)}{(2.2,1.8)} \end{Exemple} -The default value for \Verb+step+ is \Verb+badtriangles+. The first -line is then equivalent to +The default value for \Verb+step+ is +\Verb+badtriangles+. Consequently, the first +line is equivalent to \begin{latexcode} \meshAddPointBW{(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5)}{(2.2,1.8)} \end{latexcode} @@ -465,9 +469,9 @@ There are several options (some of them are the same as for \Verb+\buildMeshBW+) to customize the drawing. \begin{optionsenum} \item[mode = int (default) \textme{or} ext:] this option allows to - use either the previously described set of point in the argument - number one, or - a file, containing, line by line (2 columns), the points. Such a + use either the previously described set of point in the first + argument, or + a file containing, line by line (2 columns), the points. Such a file looks like : \begin{verbatim} x1 y1 @@ -480,7 +484,7 @@ For the second argument of the macro, if we are in the \Verb+mode = ext+, the argument must be the \emph{line number} of the file corresponding to the point we want to add. The algorithm will stop the line before to build the initial triangulation for which it will add -the point corresponding to the line. The other lines of the file are +the point corresponding to the line. The subsequent lines in the file are ignored. \item[bbox = none (default) \textme{or} show:] this option allows to draw the added points to form a \emph{bounding box} and the corresponding @@ -497,11 +501,11 @@ ignored. \item[colorBack = \meta{value} (default: black!20):] The color for the filling of the region concerned by the addition of the new point. \item[colorCircle = \meta{value} (default: green):] The color for - circoncircle of the triangles containing the point to add. + the circumcircle of the triangles containing the point to add. \item[meshpoint = \meta{value} (default: P):] The letter(s) used to - label the vertices of the triangulation. It is include in the math + label the vertices of the triangulation. It is included in the math mode delimiters \Verb+$...$+. The bounding box points are labeled - with a star exponent, and numbered from 1 to 4. + with numbers 1 to 4 and with a star exponent. \item[step = badtriangles (default) \textme{or} cavity \textme{or} newtriangles:] To choose the step we want to draw, corresponding to the steps of the Bowyer and Watson algorithm. @@ -510,7 +514,7 @@ ignored. mode delimiters \Verb+$...$+. \item[tikz (boolean, default:false):] By default, this boolean is set to \Verb+false+, and MetaPost (with \Verb+luamplib+) is used to draw - the picture. With this option, it is \Verb+tikz+ the \textit{drawing + the picture. With this option, \Verb+tikz+ is the \textit{drawing engine}. \item[scale = \meta{value} (default: 1cm):] The scale option defines the scale at which the picture is draw (the same for the two @@ -518,7 +522,7 @@ ignored. pt, etc.). \end{optionsenum} -Here is an example of customization of the drawing. First, recall that +Here is an example of customizing the drawing. First, recall that the external file \Verb+mesh.txt+ is: \begin{verbatim} 0.3 0.3 @@ -569,6 +573,17 @@ The three macros are: We consider the case where the drawing engine is MetaPost (through the \Verb+luamplib+ package). +We describe the feature taking one macro in example but the mechanism +and the possibilities are exactly the same for all the macros. + +When we use the MetaPost drawing engine, the macros previously +described produced a code of the form +\begin{latexcode} +\begin{luamplib} + +\end{luamplib} +\end{latexcode} + \subsection{With TikZ} -- 2.20.1