+ output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
+ output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
+ tex.sprint(output)
+end
+
+
+-- print points of the mesh
+function tracePointsMP(listPoints,points)
+ output = "";
+ output = output .. " pair MeshPoints[];"
+ for i=1,#listPoints do
+ output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
+ end
+ if(points=="points") then
+ j=1
+ for i=1,#listPoints do
+ if(listPoints[i].type == "bbox") then
+ output = output .. "dotlabel.llft (btex $\\MeshPoint^{*}_{" .. j .. "}$ etex, (" .. listPoints[i].x ..",".. listPoints[i].y .. ")*u ) withcolor \\luameshmpcolorBbox ;"
+ j=j+1
+ else
+ output = output .. "dotlabel.llft (btex $\\MeshPoint_{" .. i .. "}$ etex, (" .. listPoints[i].x ..",".. listPoints[i].y .. ")*u ) withcolor \\luameshmpcolor ;"
+ end
+ end
+ else
+ 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