+ for i=1,#listPoints do
+ if(listPoints[i].type == "bbox") then
+ output = output .. "drawdot (" .. listPoints[i].x ..",".. listPoints[i].y .. ")*u withcolor \\luameshmpcolorBbox withpen pencircle scaled 3;"
+ else
+ output = output .. "drawdot (" .. listPoints[i].x ..",".. listPoints[i].y .. ")*u withcolor \\luameshmpcolor withpen pencircle scaled 3;"
+ end
+ end
+ end
+ return output
+end
+
+-- print points of the mesh
+function tracePointsTikZ(listPoints,points,color,colorBbox)
+ output = "";
+ if(points=="points") then
+ j=1
+ for i=1,#listPoints do
+ if(listPoints[i].type == "bbox") then
+ output = output .. "\\draw[color="..colorBbox.."] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} node[anchor=north east] {$\\MeshPoint^*_{" .. j .. "}$};"
+ j = j+1
+ else
+ output = output .. "\\draw[color="..color.."] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} node[anchor=north east] {$\\MeshPoint_{" .. i .. "}$};"
+ end
+ end
+ else
+ for i=1,#listPoints do
+ if(listPoints[i].type == "bbox") then
+ output = output .. "\\draw[color="..colorBbox.."] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} ;"
+ else
+ output = output .. "\\draw[color="..color.."] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} ;"
+ end
+ end
+ end
+ return output
+end
+
+-- print points to mesh
+function printPointsMP(chaine,mode,points,bbox,scale)
+ listPoints = buildList(chaine, mode)
+ if(bbox == "bbox" ) then
+ listPoints = buildBoundingBox(listPoints)
+ end
+ output = tracePointsMP(listPoints,points)
+ output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
+ tex.sprint(output)
+end
+
+
+-- print points to mesh
+function printPointsMPinc(chaine,beginning, ending, mode,points,bbox,scale)
+ listPoints = buildList(chaine, mode)
+ if(bbox == "bbox" ) then
+ listPoints = buildBoundingBox(listPoints)
+ end
+ output = tracePointsMP(listPoints,points)
+ output = "\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+ tex.sprint(output)
+end
+
+-- print points to mesh
+function printPointsTikZ(chaine,mode,points,bbox,scale,color,colorBbox)
+ listPoints = buildList(chaine, mode)
+ if(bbox == "bbox" ) then
+ listPoints = buildBoundingBox(listPoints)
+ end
+ output = tracePointsTikZ(listPoints,points,color,colorBbox)
+ output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"
+ tex.sprint(output)
+end
+
+
+-- print points to mesh
+function printPointsTikZinc(chaine,beginning, ending, mode,points,bbox,scale,color,colorBbox)
+ listPoints = buildList(chaine, mode)
+ if(bbox == "bbox" ) then
+ listPoints = buildBoundingBox(listPoints)