output = "";
output = output .. " pair MeshPoints[];"
for i=1,#listPoints do
- output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
+ output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ")*u;"
end
for i=1,#triangulation do
output = "";
output = output .. " pair MeshPoints[];"
for i=1,#listPoints do
- output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
+ output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ")*u;"
end
if(points=="points") then
j=1
listPoints = buildBoundingBox(listPoints)
end
output = tracePointsMP(listPoints,points)
- output = "\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+ output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
tex.sprint(output)
end
triangulation = BowyerWatson(listPoints,bbox)
badTriangles = buildBadTriangles(P,triangulation)
for i=1,#listPoints do
- output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
+ output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ")*u;"
end
if(step == "badT") then
-- draw all triangle