-- buildVoronoi with MP
function buildVoronoiMPBW(chaine,mode,points,bbox,scale,tri,styleD,styleV)
- listPoints = buildList(chaine, mode)
- triangulation = BowyerWatson(listPoints,bbox)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints = buildList(chaine, mode)
+ local triangulation = BowyerWatson(listPoints,bbox)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
tex.sprint(output)
-- buildVoronoi with TikZ
function buildVoronoiTikZBW(chaine,mode,points,bbox,scale,tri,color,colorBbox,colorVoronoi,styleD,styleV)
- listPoints = buildList(chaine, mode)
- triangulation = BowyerWatson(listPoints,bbox)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints = buildList(chaine, mode)
+ local triangulation = BowyerWatson(listPoints,bbox)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}" tex.sprint(output)
end
-- buildVoronoi with MP
function buildVoronoiMPBWinc(chaine,beginning, ending,mode,points,bbox,scale,tri,styleD,styleV)
- listPoints = buildList(chaine, mode)
- triangulation = BowyerWatson(listPoints,bbox)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints = buildList(chaine, mode)
+ local triangulation = BowyerWatson(listPoints,bbox)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
tex.sprint(output)
-- buildVoronoi with TikZ
function buildVoronoiTikZBWinc(chaine,beginning, ending,mode,points,bbox,scale,tri,color,colorBbox,colorVoronoi)
- listPoints = buildList(chaine, mode,styleD,styleV)
- triangulation = BowyerWatson(listPoints,bbox)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints = buildList(chaine, mode,styleD,styleV)
+ local triangulation = BowyerWatson(listPoints,bbox)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
tex.sprint(output)
-- buildMesh with MP
function buildMeshMPBW(chaine,mode,points,bbox,scale)
- listPoints = buildList(chaine, mode)
- triangulation = BowyerWatson(listPoints,bbox)
+ local listPoints = buildList(chaine, mode)
+ local triangulation = BowyerWatson(listPoints,bbox)
output = traceMeshMP(listPoints, triangulation,points)
output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
tex.sprint(output)
-- buildMesh with MP include code
function buildMeshMPBWinc(chaine,beginning, ending,mode,points,bbox,scale)
- listPoints = buildList(chaine, mode)
- triangulation = BowyerWatson(listPoints,bbox)
+ local listPoints = buildList(chaine, mode)
+ local triangulation = BowyerWatson(listPoints,bbox)
output = traceMeshMP(listPoints, triangulation,points)
output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
tex.sprint(output)
-- buildMesh with TikZ
function buildMeshTikZBW(chaine,mode,points,bbox,scale,color,colorBbox)
- listPoints = buildList(chaine, mode)
- triangulation = BowyerWatson(listPoints,bbox)
+ local listPoints = buildList(chaine, mode)
+ local triangulation = BowyerWatson(listPoints,bbox)
output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"
tex.sprint(output)
-- buildMesh with TikZ
function buildMeshTikZBWinc(chaine,beginning, ending,mode,points,bbox,scale,color,colorBbox)
- listPoints = buildList(chaine, mode)
- triangulation = BowyerWatson(listPoints,bbox)
+ local listPoints = buildList(chaine, mode)
+ local triangulation = BowyerWatson(listPoints,bbox)
output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
tex.sprint(output)
-- print points to mesh
function printPointsMP(chaine,mode,points,bbox,scale)
- listPoints = buildList(chaine, mode)
+ local listPoints = buildList(chaine, mode)
if(bbox == "bbox" ) then
listPoints = buildBoundingBox(listPoints)
end
-- print points to mesh
function printPointsMPinc(chaine,beginning, ending, mode,points,bbox,scale)
- listPoints = buildList(chaine, mode)
+ local listPoints = buildList(chaine, mode)
if(bbox == "bbox" ) then
listPoints = buildBoundingBox(listPoints)
end
-- print points to mesh
function printPointsTikZ(chaine,mode,points,bbox,scale,color,colorBbox)
- listPoints = buildList(chaine, mode)
+ local listPoints = buildList(chaine, mode)
if(bbox == "bbox" ) then
listPoints = buildBoundingBox(listPoints)
end
-- print points to mesh
function printPointsTikZinc(chaine,beginning, ending, mode,points,bbox,scale,color,colorBbox)
- listPoints = buildList(chaine, mode)
+ local listPoints = buildList(chaine, mode)
if(bbox == "bbox" ) then
listPoints = buildBoundingBox(listPoints)
end
-- buildMesh
function buildRect(largeur,a,b,nbrA, nbrB)
- listPoints = rectangleList(a,b,nbrA,nbrB)
- triangulation = BowyerWatson(listPoints,"none")
+ local listPoints = rectangleList(a,b,nbrA,nbrB)
+ local triangulation = BowyerWatson(listPoints,"none")
traceTikZ(listPoints, triangulation,largeur,"none")
end
function TeXaddOnePointTikZ(listPoints,P,step,bbox,color,colorBack, colorNew, colorCircle,colorBbox)
output = ""
-- build the triangulation
- triangulation = BowyerWatson(listPoints,bbox)
- badTriangles = buildBadTriangles(P,triangulation)
+ local triangulation = BowyerWatson(listPoints,bbox)
+ local badTriangles = buildBadTriangles(P,triangulation,listPoints)
for i=1,#listPoints do
output = output .. "\\coordinate (MeshPoints".. i .. ") at (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
end
output = "";
output = output .. "pair MeshPoints[];"
-- build the triangulation
+ local triangulation = {}
+ local badTriangles = {}
triangulation = BowyerWatson(listPoints,bbox)
- badTriangles = buildBadTriangles(P,triangulation)
+ badTriangles = buildBadTriangles(P,triangulation,listPoints)
for i=1,#listPoints do
output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ")*u;"
end
function TeXOnePointTikZBW(chaine,point,step,scale,mode,bbox,color,colorBack,colorNew,colorCircle,colorBbox)
+ local listPoints = {}
if(mode=="int") then
Sx,Sy=string.match(point,"%((.+),(.+)%)")
P = {x=Sx, y=Sy}
end
function TeXOnePointTikZBWinc(chaine,point,beginning, ending,step,scale,mode,bbox,color,colorBack,colorNew,colorCircle,colorBbox)
+ local listPoints = {}
if(mode=="int") then
Sx,Sy=string.match(point,"%((.+),(.+)%)")
P = {x=Sx, y=Sy}
end
function TeXOnePointMPBW(chaine,point,step,scale,mode,bbox)
+ local listPoints = {}
if(mode=="int") then
Sx,Sy=string.match(point,"%((.+),(.+)%)")
P = {x=Sx, y=Sy}
end
function TeXOnePointMPBWinc(chaine,point,beginning,ending,step,scale,mode,bbox)
+ local listPoints = {}
if(mode=="int") then
Sx,Sy=string.match(point,"%((.+),(.+)%)")
P = {x=Sx, y=Sy}
function drawGmshMP(file,points,scale)
- listPoints,triangulation = readGmsh(file)
+ local listPoints,triangulation = readGmsh(file)
output = traceMeshMP(listPoints,triangulation,points)
output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
tex.sprint(output)
end
function drawGmshMPinc(file,beginning,ending,points,scale)
- listPoints,triangulation = readGmsh(file)
+ local listPoints,triangulation = readGmsh(file)
output = traceMeshMP(listPoints,triangulation,points)
output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
tex.sprint(output)
--
function drawGmshTikZ(file,points,scale,color)
- listPoints,triangulation = readGmsh(file)
+ local listPoints,triangulation = readGmsh(file)
output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"
tex.sprint(output)
--
function drawGmshTikZinc(file,beginning, ending,points,scale,color)
- listPoints,triangulation = readGmsh(file)
+ local listPoints,triangulation = readGmsh(file)
output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
tex.sprint(output)
-- buildVoronoi with MP
function gmshVoronoiMP(file,points,scale,tri,styleD,styleV)
- listPoints,triangulation = readGmsh(file)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints,triangulation = readGmsh(file)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
tex.sprint(output)
-- buildVoronoi with TikZ
function gmshVoronoiTikZ(file,points,scale,tri,color,colorVoronoi,styleD,styleV)
- listPoints,triangulation = readGmsh(file)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints,triangulation = readGmsh(file)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}" tex.sprint(output)
end
-- buildVoronoi with MP
function gmshVoronoiMPinc(file,beginning, ending,points,scale,tri,styleD,styleV)
- listPoints,triangulation = readGmsh(file)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints,triangulation = readGmsh(file)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
tex.sprint(output)
-- buildVoronoi with TikZ
function gmshVoronoiTikZinc(file,beginning, ending,points,scale,tri,color,colorVoronoi,styleD,styleV)
- listPoints,triangulation = readGmsh(file)
- listVoronoi = buildVoronoi(listPoints, triangulation)
+ local listPoints,triangulation = readGmsh(file)
+ local listVoronoi = buildVoronoi(listPoints, triangulation)
output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
tex.sprint(output)
function tracePolygonMP(polygon,points)
output = "";
output = output .. "pair polygon[];"
- print(#polygon)
for i=1,#polygon do
output = output .. "polygon[".. i .. "] = (" .. polygon[i].x .. "," .. polygon[i].y .. ")*u;"
end
points,scale)
local polygon = buildList(chaine, mode)
polygon = addPointsPolygon(polygon,h)
- print(#polygon)
local grid = buildGrid(polygon,h)
- print(#polygon)
local listPoints = addGridPoints(polygon,grid,h)
- print(#polygon)
if(step=="polygon") then
-- the polygon
output = tracePolygonMP(polygon,points)
\begin{document}
-% \section{MetaPost}
-
-% \buildMeshBW[print=points, meshpoint = I, color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
-
-% %\buildMeshBW[tikz, bbox = show]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
-
-% \buildMeshBW[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt}
-
-% \drawPointsMesh[mode=ext,bbox = show, color=red,print=points]{mesh.txt}
-
-% \drawPointsMesh[mode=ext,bbox = show, color=red]{mesh.txt}
-
-
-% \buildMeshBWinc[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt}{%
-% beginfig(0);
-% }%
-% {%
-% draw MeshPoints[3] -- MeshPoints[9];
-% endfig;
-% }
-
-% \meshAddPointBW[
-% meshpoint = x,
-% colorNew =green!20!red,
-% colorBack=red!10,
-% colorCircle = green!70,
-% scale=0.6cm]
-% {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
-% \meshAddPointBW[
-% color = green,
-% meshpoint = x,
-% colorBack=red!10,
-% colorNew = green!20!red,
-% scale=0.6cm,
-% step=cavity]
-% {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
-% \meshAddPointBW[
-% meshpoint = x,
-% colorBack=red!10,
-% colorNew = green!20!red,
-% scale=0.6cm,
-% step=badtriangles,
-% newpoint = y,
-% bbox = show,
-% colorBbox = black
-% ]
-% {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
-
-% \mplibcolor\myclr{red}
-
-% \newcommand\test{draw (0,0) -- (2cm,0) withcolor \myclr;}
-
-% \begin{mplibcode}
-% beginfig(0);
-% %\meshAddOnePoint[picture=embedded]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
-% \test
-% endfig;
-% \end{mplibcode}
-
-% \meshAddPointBWinc[
-% meshpoint = x,
-% colorBack=red!10,
-% colorNew = green!20!red,
-% scale=0.6cm,
-% step=badtriangles,
-% newpoint = y,
-% bbox = show,
-% colorBbox = blue!20,
-% ]
-% {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}{%
-% beginfig(0);
-% }%
-% {%
-% draw (-1,-1)*u--(8.5,-1)*u--(8.5,6)*u--(-1,6)*u--cycle withcolor \mpcolor{red};
-% endfig;
+\section{MetaPost}
+
+\buildMeshBW[print=points, meshpoint = I, color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
+
+%\buildMeshBW[tikz, bbox = show]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
+
+\buildMeshBW[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt}
+
+\drawPointsMesh[mode=ext,bbox = show, color=red,print=points]{mesh.txt}
+
+\drawPointsMesh[mode=ext,bbox = show, color=red]{mesh.txt}
+
+
+\buildMeshBWinc[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt}{%
+ beginfig(0);
+}%
+{%
+ draw MeshPoints[3] -- MeshPoints[9];
+ endfig;
+}
+
+\meshAddPointBW[
+meshpoint = x,
+colorNew =green!20!red,
+colorBack=red!10,
+colorCircle = green!70,
+scale=0.6cm]
+{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
+\meshAddPointBW[
+ color = green,
+ meshpoint = x,
+ colorBack=red!10,
+ colorNew = green!20!red,
+ scale=0.6cm,
+ step=cavity]
+ {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
+\meshAddPointBW[
+meshpoint = x,
+colorBack=red!10,
+colorNew = green!20!red,
+scale=0.6cm,
+step=badtriangles,
+newpoint = y,
+bbox = show,
+colorBbox = black
+]
+{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
+
+\mplibcolor\myclr{red}
+
+\newcommand\test{draw (0,0) -- (2cm,0) withcolor \myclr;}
+
+\begin{mplibcode}
+ beginfig(0);
+ %\meshAddOnePoint[picture=embedded]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
+ \test
+ endfig;
+\end{mplibcode}
+
+\meshAddPointBWinc[
+meshpoint = x,
+colorBack=red!10,
+colorNew = green!20!red,
+scale=0.6cm,
+step=badtriangles,
+newpoint = y,
+bbox = show,
+colorBbox = blue!20,
+]
+{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}{%
+beginfig(0);
+}%
+{%
+ draw (-1,-1)*u--(8.5,-1)*u--(8.5,6)*u--(-1,6)*u--cycle withcolor \mpcolor{red};
+endfig;
+}
+
+
+\section{tikz}
+
+\buildMeshBW[tikz,print=points, meshpoint = I,
+color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
+
+\buildMeshBW[tikz,mode=ext, color=red]{mesh.txt}
+
+\drawPointsMesh[tikz,mode=ext,bbox = show,
+color=red,print=points]{mesh.txt}
+\drawPointsMesh[tikz,mode=ext,bbox = show, color=red]{mesh.txt}
+
+\buildMeshBWinc[tikz,mode=ext,bbox = show, colorBbox = blue]{mesh.txt}{%
+}%
+{%
+ \draw[color = red] (0,0) -- (3,3);
+}
+
+\meshAddPointBW[
+tikz,
+color = green,
+meshpoint = x,
+colorBack=red!10,
+colorNew = green!20!red,
+scale=0.6cm,
+step=cavity]
+{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
+
+\meshAddPointBWinc[
+tikz,
+meshpoint = x,
+colorBack=red!10,
+colorNew = green!20!red,
+scale=0.6cm,
+step=badtriangles,
+newpoint = y,
+bbox = show,
+colorBbox = blue!20,
+]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
+{}{\draw[color=green] (0,0) -- (3,3);}
+
+\meshAddPointBW[
+tikz,
+meshpoint = x,
+colorBack=red!10,
+colorNew = green!20!red,
+scale=0.6cm,
+step=badtriangles,
+newpoint = y,
+bbox = show,
+colorBbox = black
+]
+{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
+
+
+% \def\CircumPoint{y}
+% \luampcolor
+% \directlua{
+% buildVoronoiMP("mesh.txt","ext","points","","1cm","show")
% }
+\buildVoronoiBW[mode=ext]{mesh.txt}
+\buildVoronoiBW[mode=ext,delaunay=show,colorVoronoi=green!60!blue]{mesh.txt}\par
+\buildVoronoiBW[mode=ext,print=points,delaunay=show,bbox=show,meshpoint=x,circumpoint=y]{mesh.txt}
-% \section{tikz}
+\buildVoronoiBW[tikz,mode=ext]{mesh.txt}
+\buildVoronoiBW[tikz,mode=ext,delaunay=show,colorVoronoi=green!60!blue]{mesh.txt}\par
+\buildVoronoiBW[tikz,mode=ext,print=points,delaunay=show,bbox=show,meshpoint=x,circumpoint=y]{mesh.txt}
-% \buildMeshBW[tikz,print=points, meshpoint = I,
-% color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
+\buildVoronoiBWinc[mode=ext]{mesh.txt}{beginfig(0);}{endfig;}
+\buildVoronoiBWinc[tikz,mode=ext,print=points]{mesh.txt}{}{}
-% \buildMeshBW[tikz,mode=ext, color=red]{mesh.txt}
-% \drawPointsMesh[tikz,mode=ext,bbox = show,
-% color=red,print=points]{mesh.txt}
-% \drawPointsMesh[tikz,mode=ext,bbox = show, color=red]{mesh.txt}
-
-% \buildMeshBWinc[tikz,mode=ext,bbox = show, colorBbox = blue]{mesh.txt}{%
-% }%
-% {%
-% \draw[color = red] (0,0) -- (3,3);
-% }
+\buildVoronoiBWinc[tikz,mode=ext,print=points,delaunay=show,meshpoint=x,circumpoint=y]{mesh.txt}{}{\draw[color=blue,thick] (0,0)--(3,3);}
-% \meshAddPointBW[
-% tikz,
-% color = green,
-% meshpoint = x,
-% colorBack=red!10,
-% colorNew = green!20!red,
-% scale=0.6cm,
-% step=cavity]
-% {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
-
-% \meshAddPointBWinc[
-% tikz,
-% meshpoint = x,
-% colorBack=red!10,
-% colorNew = green!20!red,
-% scale=0.6cm,
-% step=badtriangles,
-% newpoint = y,
-% bbox = show,
-% colorBbox = blue!20,
-% ]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
-% {}{\draw[color=green] (0,0) -- (3,3);}
-
-% \meshAddPointBW[
-% tikz,
-% meshpoint = x,
-% colorBack=red!10,
-% colorNew = green!20!red,
-% scale=0.6cm,
-% step=badtriangles,
-% newpoint = y,
-% bbox = show,
-% colorBbox = black
-% ]
-% {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
-
-
-% % \def\CircumPoint{y}
-% % \luampcolor
-% % \directlua{
-% % buildVoronoiMP("mesh.txt","ext","points","","1cm","show")
-% % }
-% \buildVoronoiBW[mode=ext]{mesh.txt}
-% \buildVoronoiBW[mode=ext,delaunay=show,colorVoronoi=green!60!blue]{mesh.txt}\par
-% \buildVoronoiBW[mode=ext,print=points,delaunay=show,bbox=show,meshpoint=x,circumpoint=y]{mesh.txt}
-
-
-% \buildVoronoiBW[tikz,mode=ext]{mesh.txt}
-% \buildVoronoiBW[tikz,mode=ext,delaunay=show,colorVoronoi=green!60!blue]{mesh.txt}\par
-% \buildVoronoiBW[tikz,mode=ext,print=points,delaunay=show,bbox=show,meshpoint=x,circumpoint=y]{mesh.txt}
-
-% \buildVoronoiBWinc[mode=ext]{mesh.txt}{beginfig(0);}{endfig;}
-% \buildVoronoiBWinc[tikz,mode=ext,print=points]{mesh.txt}{}{}
-
-
-% \buildVoronoiBWinc[tikz,mode=ext,print=points,delaunay=show,meshpoint=x,circumpoint=y]{mesh.txt}{}{\draw[color=blue,thick] (0,0)--(3,3);}
-
-% \def\MeshPoints{P}
-% \directlua{
-% drawGmshMP("maillage.msh","points","8cm")
-% }\par
-% \directlua{
-% gmshVoronoiMP("maillage.msh","none","8cm","none")
-% }
+\def\MeshPoints{P}
+\directlua{
+ drawGmshMP("maillage.msh","points","8cm")
+}\par
+\directlua{
+ gmshVoronoiMP("maillage.msh","none","8cm","none")
+}
-% \drawGmsh[tikz,scale=8cm]{maillage.msh}
+\drawGmsh[tikz,scale=8cm]{maillage.msh}
-% \gmshVoronoi[tikz,scale=8cm,print=points,delaunay=show]{maillage.msh}
+\gmshVoronoi[tikz,scale=8cm,print=points,delaunay=show]{maillage.msh}
\meshPolygon[step=polygon,scale=3cm]{(0,0);(1,0);(1,0.5);(0.5,1);(-0.3,0.3)}