X-Git-Url: https://melusine.eu.org/syracuse/G/git/?p=delaunay.git;a=blobdiff_plain;f=luamesh.lua;h=945d9cc443c9eafc02b439815e374011eeb895a5;hp=9b761e2534e174e6b40b71c0856c56923e1788b2;hb=8dac495f9a49c66620e9e105e9cc16b5243dd8f7;hpb=cc95d9b8f7a859cf2f69b419e15bd1a8a2777289 diff --git a/luamesh.lua b/luamesh.lua index 9b761e2..945d9cc 100644 --- a/luamesh.lua +++ b/luamesh.lua @@ -449,11 +449,11 @@ function TeXaddOnePointTikZ(chaine,point,step,color,colorBack, colorNew, colorCi return output end -function TeXaddOnePointMP(listPoints,P,step,color,colorBack, colorNew, colorCircle) +function TeXaddOnePointMP(listPoints,P,step,color,colorBack, colorNew, colorCircle,bbox) output = ""; output = output .. "pair MeshPoints[];" -- build the triangulation - triangulation = BowyerWatson(listPoints,"none") + triangulation = BowyerWatson(listPoints,bbox) badTriangles = buildBadTriangles(P,triangulation) for i=1,#listPoints do output = output .. "MeshPoints[".. i .. "] = (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");" @@ -576,7 +576,7 @@ function TeXOnePointTikZ(chaine,point,step,color,colorBack,colorNew,colorCircle, tex.sprint(output) end -function TeXOnePointMP(chaine,point,step,color,colorBack,colorNew,colorCircle,scale,mode,picture) +function TeXOnePointMP(chaine,point,step,color,colorBack,colorNew,colorCircle,scale,mode,picture,bbox) if(mode=="int") then Sx,Sy=string.match(point,"%((.+),(.+)%)") P = {x=Sx, y=Sy} @@ -585,7 +585,7 @@ function TeXOnePointMP(chaine,point,step,color,colorBack,colorNew,colorCircle,sc -- point is a number P, listPoints = buildListExt(chaine,tonumber(point)) end - output = TeXaddOnePointMP(listPoints,P,step,color,colorBack,colorNew,colorCircle) + output = TeXaddOnePointMP(listPoints,P,step,color,colorBack,colorNew,colorCircle,bbox) if(picture=="full") then output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale..";".. output .. "endfig;\\end{mplibcode}" else