X-Git-Url: https://melusine.eu.org/syracuse/G/git/?p=delaunay.git;a=blobdiff_plain;f=luamesh.lua;h=e23d7a09c88e925a60e078023c1203908cdacf32;hp=83c2c257a34ea2ae9be4511885f314ddf3355ebc;hb=0fc3412f5527ee6e9e3e1291ae9d028e64b1db1c;hpb=60cfa183014f7810d3a82e4fb1c1a468454be97b diff --git a/luamesh.lua b/luamesh.lua index 83c2c25..e23d7a0 100644 --- a/luamesh.lua +++ b/luamesh.lua @@ -285,7 +285,7 @@ function traceMeshMP(listPoints, triangulation,points) 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 @@ -355,7 +355,7 @@ function tracePointsMP(listPoints,points) 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 @@ -423,7 +423,7 @@ function printPointsMPinc(chaine,beginning, ending, mode,points,bbox,scale) 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 @@ -637,7 +637,7 @@ function TeXaddOnePointMPBW(listPoints,P,step,bbox) 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