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}
}
\vfill
\begin{center}
- Version 0.1, 25 novembre 2016\\
+ Version 0.2, 29 novembre 2016\\
\url{http://melusine.eu.org/syracuse/G/delaunay/}
\end{center}
%% == Page de garde ====================================================
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}
+ \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}
\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}
\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;}
-
\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
\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
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
\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
\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
}
}
\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
endfig;
}
\newpage
- \buildMeshBWinc[
- mode=ext,
- print=points
- ]
- {mesh.txt}%
+ \buildMeshBWinc[mode=ext,print=points]{mesh.txt}%
{%
beginfig(0);
\drawPath