Ajout fonctionnalité de dashed pour Voronoi, documentation
[delaunay.git] / doc / luamesh-doc.tex
index 3e13204..e3408cc 100644 (file)
@@ -67,8 +67,9 @@
   breaklines=true,
   breakindent=30pt,
   defaultdialect=[LaTeX]TeX,
   breaklines=true,
   breakindent=30pt,
   defaultdialect=[LaTeX]TeX,
-  morekeywords={buildMeshBW,buildMeshBWinc,drawPointsMesh,
-    drawPointsMeshinc, meshAddPointBW, meshAddPointBWinc}% frame=tb
+  morekeywords={buildMeshBW,buildMeshBWinc,drawPointsMesh,buildVoronoiBW,buildVoronoiBWinc,
+    drawPointsMeshinc, meshAddPointBW,
+    meshAddPointBWinc,drawGmsh,drawGmshinc,gmshVoronoi,gmshVoronoiinc}% frame=tb
 }
 
 \lstdefinelanguage{lua}
 }
 
 \lstdefinelanguage{lua}
@@ -835,8 +836,18 @@ xn yn
   the scale at which the picture is drawn (the same for both
   axes). It must contain the unit of length (cm,
   pt, etc.).
   the scale at which the picture is drawn (the same for both
   axes). It must contain the unit of length (cm,
   pt, etc.).
+\item[delaunay = none (default) \textme{or} show] This option
+  allows to draw the Delaunay triangulation under the Voronoi diagram.
+\item[styleDelaunay = none (default) \textme{or} dashed] This option
+  allows to draw dashed lines for the Delaunay triangulation.
+\item[styleVoronoi = none (default) \textme{or} dashed] This option
+  allows to draw dashed lines for the Voronoi edges.
 \end{optionsenum}
 
 \end{optionsenum}
 
+\begin{Exemple}
+  \buildVoronoiBW[tikz,delaunay=show,styleDelaunay=dashed]
+  {(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);(0.1,2);(1.5,-0.3)}
+\end{Exemple}
 
 \subsection{The \emph{inc} variant}
 
 
 \subsection{The \emph{inc} variant}
 
@@ -916,7 +927,49 @@ Voronoi diagram associated. This is done by the following macro:\bigskip
   \gmshVoronoi{maillage.msh}
 \end{Exemple}
 
   \gmshVoronoi{maillage.msh}
 \end{Exemple}
 
-We refer to the section~\ref{sec:voronoiOptions} for the list of the options.
+
+\subsection{The Options}\label{sec:voronoiOptions}
+
+
+There are several options to customize the drawing.
+\begin{optionsenum}
+\item[color = \meta{value} (default: black):] The color of the
+  drawing.
+\item[colorVoronoi = \meta{value} (default: black):] The color of the
+  drawing for the elements (points and polygons) belonging to the
+  Voronoi diagram.
+\item[print = none (default) \textme{or} points:] To label the vertices of the
+  triangulation. Contrary to the previous macros, where
+  \Verb+print=none+,  a \emph{dot} is produced at each vertex (of the
+  set of points and on the circumcircle center which are the nodes of
+  the Voronoi diagram).
+\item[meshpoint = \meta{value} (default: P):] The letter(s) used to
+  label the vertices of the triangulation. It is included in the math
+  mode delimiters \Verb+$...$+. The bounding box points are labeled
+  with numbers 1 to 4 and with a star exponent.
+\item[circumpoint = \meta{value} (default: P):] The letter(s) used to
+  label the vertices of the Voronoi diagram. It is included in the math
+  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, \Verb+tikz+ becomes the \textit{drawing
+    engine}.
+\item[scale = \meta{value} (default: 1cm):] The scale option defines
+  the scale at which the picture is drawn (the same for both
+  axes). It must contain the unit of length (cm,
+  pt, etc.).
+\item[delaunay = none (default) \textme{or} show] This option
+  allows to draw the Delaunay triangulation under the Voronoi diagram.
+\item[styleDelaunay = none (default) \textme{or} dashed] This option
+  allows to draw dashed lines for the Delaunay triangulation.
+\item[styleVoronoi = none (default) \textme{or} dashed] This option
+  allows to draw dashed lines for the Voronoi edges.
+\end{optionsenum}
+
+\begin{Exemple}
+  \gmshVoronoi[tikz,scale=1.5cm, delaunay=show,styleVoronoi=dashed]{maillage.msh}
+\end{Exemple}
+
 
 \subsection{The \emph{inc} variants}
 
 
 \subsection{The \emph{inc} variants}
 
@@ -944,19 +997,10 @@ For example, the following code (in a file name \Verb+animation.tex+):
   \usepackage{fontspec}
   \usepackage{multido}
   \pagestyle{empty}
   \usepackage{fontspec}
   \usepackage{multido}
   \pagestyle{empty}
-
   \def\drawPath{draw (-2,-2)*u--(8,-2)*u--(8,6)*u--(-2,6)*u--cycle  withcolor 0.99white;}
   \def\clipPath{clip currentpicture to (-2,-2)*u--(8,-2)*u--(8,6)*u--(-2,6)*u--cycle;}
   \def\drawPath{draw (-2,-2)*u--(8,-2)*u--(8,6)*u--(-2,6)*u--cycle  withcolor 0.99white;}
   \def\clipPath{clip currentpicture to (-2,-2)*u--(8,-2)*u--(8,6)*u--(-2,6)*u--cycle;}
-
   \begin{document}
   \begin{document}
-
-  \drawPointsMeshinc[
-  mode=ext,
-  bbox = show,
-  colorBbox = blue!20,
-  print=points
-  ]
-  {mesh.txt}%
+  \drawPointsMeshinc[mode=ext, bbox = show,colorBbox = blue!20,print=points]{mesh.txt}%
   {%
     beginfig(0);
     \drawPath
   {%
     beginfig(0);
     \drawPath
@@ -965,14 +1009,7 @@ For example, the following code (in a file name \Verb+animation.tex+):
     \clipPath
     endfig;
   }
     \clipPath
     endfig;
   }
-  \newpage
-  \buildMeshBWinc[
-  mode=ext,
-  bbox = show,
-  colorBbox = blue!20,
-  print=points
-  ]
-  {meshInit.txt}%
+  \newpage\buildMeshBWinc[mode=ext,bbox = show,colorBbox = blue!20,print=points]{meshInit.txt}%
   {%
     beginfig(0);
     \drawPath
   {%
     beginfig(0);
     \drawPath
@@ -982,16 +1019,9 @@ For example, the following code (in a file name \Verb+animation.tex+):
     endfig;
   }
   \multido{\ii=5+1}{4}{%
     endfig;
   }
   \multido{\ii=5+1}{4}{%
-    \newpage
-    \meshAddPointBWinc[
-    mode=ext,step=badtriangles,
-    colorNew =green!20!red,
-    colorBack=red!10,
-    colorCircle = blue,
-    bbox = show,
-    colorBbox = blue!20
-    ]
-    {mesh.txt}{\ii}%
+    \newpage\meshAddPointBWinc[mode=ext,step=badtriangles,colorNew
+    =green!20!red,colorBack=red!10,colorCircle = blue,bbox =
+    show,colorBbox = blue!20]{mesh.txt}{\ii}%
     {%
       beginfig(0);
       \drawPath
     {%
       beginfig(0);
       \drawPath
@@ -1000,15 +1030,9 @@ For example, the following code (in a file name \Verb+animation.tex+):
       \clipPath
       endfig;
     }   \newpage
       \clipPath
       endfig;
     }   \newpage
-    \meshAddPointBWinc[
-    mode=ext,step=cavity,
-    colorNew =green!20!red,
-    colorBack=red!10,
-    colorCircle = blue,
-    bbox = show,
-    colorBbox = blue!20
-    ]
-    {mesh.txt}{\ii}%
+    \meshAddPointBWinc[mode=ext,step=cavity,colorNew
+    =green!20!red,colorBack=red!10,colorCircle = blue,bbox =
+    show,colorBbox = blue!20]{mesh.txt}{\ii}%
     {%
       beginfig(0);
       \drawPath
     {%
       beginfig(0);
       \drawPath
@@ -1017,14 +1041,9 @@ For example, the following code (in a file name \Verb+animation.tex+):
       \clipPath
       endfig;
     }  \newpage
       \clipPath
       endfig;
     }  \newpage
-    \meshAddPointBWinc[
-    mode=ext,step=newtriangles,
-    colorNew =green!20!red,
-    colorBack=red!10,
-    colorCircle = blue,
-    bbox = show,
-    colorBbox = blue!20]
-    {mesh.txt}{\ii}%
+    \meshAddPointBWinc[mode=ext,step=newtriangles,colorNew
+    =green!20!red,colorBack=red!10,colorCircle = blue,bbox =
+    show,colorBbox = blue!20]{mesh.txt}{\ii}%
     {%
       beginfig(0);
       \drawPath
     {%
       beginfig(0);
       \drawPath
@@ -1035,13 +1054,7 @@ For example, the following code (in a file name \Verb+animation.tex+):
     }
   }
   \newpage
     }
   }
   \newpage
-  \buildMeshBWinc[
-  mode=ext,
-  bbox = show,
-  colorBbox = blue!20,
-  print=points
-  ]
-  {mesh.txt}%
+  \buildMeshBWinc[mode=ext,bbox = show,colorBbox = blue!20,print=points]{mesh.txt}%
   {%
     beginfig(0);
     \drawPath
   {%
     beginfig(0);
     \drawPath
@@ -1051,11 +1064,7 @@ For example, the following code (in a file name \Verb+animation.tex+):
     endfig;
   }
   \newpage
     endfig;
   }
   \newpage
-  \buildMeshBWinc[
-  mode=ext,
-  print=points
-  ]
-  {mesh.txt}%
+  \buildMeshBWinc[mode=ext,print=points]{mesh.txt}%
   {%
     beginfig(0);
     \drawPath
   {%
     beginfig(0);
     \drawPath

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.