X-Git-Url: https://melusine.eu.org/syracuse/G/git/?a=blobdiff_plain;f=test%2Fdelaunay.tex;h=adb9525fea44542eb71aef710cc3e72c617c6040;hb=c25242309db6a2554651e368376b07d30afc3601;hp=dae9c6350edabb554f26a37d6db417324e7a58fb;hpb=cc95d9b8f7a859cf2f69b419e15bd1a8a2777289;p=delaunay.git diff --git a/test/delaunay.tex b/test/delaunay.tex index dae9c63..adb9525 100644 --- a/test/delaunay.tex +++ b/test/delaunay.tex @@ -7,46 +7,136 @@ \pagestyle{empty} \begin{document} -\buildMesh[print=points, meshpoint = I, color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)} -\buildMesh[tikz, bbox = show]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)} +\section{MetaPost} -\buildMesh[mode=ext]{mesh.txt} +\buildMeshBW[print=points, meshpoint = I, color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)} -\meshAddOnePoint[ +%\buildMeshBW[tikz, bbox = show]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)} + +\buildMeshBW[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt} + +\tracePointsMesh[mode=ext,bbox = show, color=red,print=points]{mesh.txt} + +\tracePointsMesh[mode=ext,bbox = show, color=red]{mesh.txt} + + +\buildMeshBWinc[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt}{% + beginfig(0); +}% +{% + draw MeshPoints[3] -- MeshPoints[9]; + endfig; +} + +\meshAddPointBW[ meshpoint = x, colorNew =green!20!red, colorBack=red!10, colorCircle = green!70, scale=0.6cm] {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} -\meshAddOnePoint[ +\meshAddPointBW[ + color = green, + meshpoint = x, + colorBack=red!10, + colorNew = green!20!red, + scale=0.6cm, + step=cavity] + {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} +\meshAddPointBW[ meshpoint = x, colorBack=red!10, colorNew = green!20!red, scale=0.6cm, -step=cavity] +step=badtriangles, +newpoint = y, +bbox = show, +colorBbox = black +] {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} -\meshAddOnePoint[ + +\mplibcolor\myclr{red} + +\newcommand\test{draw (0,0) -- (2cm,0) withcolor \myclr;} + +\begin{mplibcode} + beginfig(0); + %\meshAddOnePoint[picture=embedded]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} + \test + endfig; +\end{mplibcode} + +\meshAddPointBWinc[ meshpoint = x, colorBack=red!10, colorNew = green!20!red, scale=0.6cm, -step=newtriangles, -newpoint = y +step=badtriangles, +newpoint = y, +bbox = show, +colorBbox = blue!20, ] -{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} +{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}{% +beginfig(0); +}% +{% + draw (-1,-1)*u--(8.5,-1)*u--(8.5,6)*u--(-1,6)*u--cycle withcolor \mpcolor{red}; +endfig; +} + + +\section{tikz} + +\buildMeshBW[tikz,print=points, meshpoint = I, +color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)} + +\buildMeshBW[tikz,mode=ext, color=red]{mesh.txt} +\tracePointsMesh[tikz,mode=ext,bbox = show, +color=red,print=points]{mesh.txt} +\tracePointsMesh[tikz,mode=ext,bbox = show, color=red]{mesh.txt} -% \newcommand\mpred{\mpcolor{red}} -% \newcommand\test{dotlabel(btex $x$ etex, (0,0));draw (0,0)--(2cm,0) withcolor red;} +\buildMeshBWinc[tikz,mode=ext,bbox = show, colorBbox = blue]{mesh.txt}{% +}% +{% + \draw[color = red] (0,0) -- (3,3); +} -% \begin{mplibcode} -% beginfig(0); -% %\meshAddOnePoint[picture=embedded]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} -% \test -% endfig; -% \end{mplibcode} +\meshAddPointBW[ +tikz, +color = green, +meshpoint = x, +colorBack=red!10, +colorNew = green!20!red, +scale=0.6cm, +step=cavity] +{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} +\meshAddPointBWinc[ +tikz, +meshpoint = x, +colorBack=red!10, +colorNew = green!20!red, +scale=0.6cm, +step=badtriangles, +newpoint = y, +bbox = show, +colorBbox = blue!20, +]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} +{}{\draw[color=green] (0,0) -- (3,3);} + +\meshAddPointBW[ +tikz, +meshpoint = x, +colorBack=red!10, +colorNew = green!20!red, +scale=0.6cm, +step=badtriangles, +newpoint = y, +bbox = show, +colorBbox = black +] +{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)} \end{document}