-- trace a triangulation with TikZ
function traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
output = ""
+ for i=1,#listPoints do
+ output = output .. "\\coordinate (MeshPoints".. i .. ") at (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
+ end
for i=1,#triangulation do
PointI = listPoints[triangulation[i][1]]
PointJ = listPoints[triangulation[i][2]]
-- print points of the mesh
function tracePointsTikZ(listPoints,points,color,colorBbox)
output = "";
+ for i=1,#listPoints do
+ output = output .. "\\coordinate (MeshPoints".. i .. ") at (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
+ end
if(points=="points") then
j=1
for i=1,#listPoints do
-- build the triangulation
triangulation = BowyerWatson(listPoints,bbox)
badTriangles = buildBadTriangles(P,triangulation)
+ for i=1,#listPoints do
+ output = output .. "\\coordinate (MeshPoints".. i .. ") at (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
+ end
if(step == "badT") then
-- draw all triangle
for i=1,#triangulation do