fonction meshPolygon pour MetaPost faite, ajout de dotpoints pour drawMesh (toujours...
[delaunay.git] / test / delaunay.tex
1 \documentclass{article}
2 %% compiler avec lualatex
3 \usepackage[margin=2.5cm]{geometry}
4 \usepackage{luamesh}
5 \usepackage{fontspec}
6 \usepackage{multido}
7 \pagestyle{empty}
8 \begin{document}
9
10
11 % \section{MetaPost}
12
13 % \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)}
14
15 % %\buildMeshBW[tikz, bbox = show]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
16
17 % \buildMeshBW[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt}
18
19 % \drawPointsMesh[mode=ext,bbox = show, color=red,print=points]{mesh.txt}
20
21 % \drawPointsMesh[mode=ext,bbox = show, color=red]{mesh.txt}
22
23
24 % \buildMeshBWinc[mode=ext,bbox = show, color=red,colorBbox = blue]{mesh.txt}{%
25 % beginfig(0);
26 % }%
27 % {%
28 % draw MeshPoints[3] -- MeshPoints[9];
29 % endfig;
30 % }
31
32 % \meshAddPointBW[
33 % meshpoint = x,
34 % colorNew =green!20!red,
35 % colorBack=red!10,
36 % colorCircle = green!70,
37 % scale=0.6cm]
38 % {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
39 % \meshAddPointBW[
40 % color = green,
41 % meshpoint = x,
42 % colorBack=red!10,
43 % colorNew = green!20!red,
44 % scale=0.6cm,
45 % step=cavity]
46 % {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
47 % \meshAddPointBW[
48 % meshpoint = x,
49 % colorBack=red!10,
50 % colorNew = green!20!red,
51 % scale=0.6cm,
52 % step=badtriangles,
53 % newpoint = y,
54 % bbox = show,
55 % colorBbox = black
56 % ]
57 % {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
58
59 % \mplibcolor\myclr{red}
60
61 % \newcommand\test{draw (0,0) -- (2cm,0) withcolor \myclr;}
62
63 % \begin{mplibcode}
64 % beginfig(0);
65 % %\meshAddOnePoint[picture=embedded]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
66 % \test
67 % endfig;
68 % \end{mplibcode}
69
70 % \meshAddPointBWinc[
71 % meshpoint = x,
72 % colorBack=red!10,
73 % colorNew = green!20!red,
74 % scale=0.6cm,
75 % step=badtriangles,
76 % newpoint = y,
77 % bbox = show,
78 % colorBbox = blue!20,
79 % ]
80 % {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}{%
81 % beginfig(0);
82 % }%
83 % {%
84 % draw (-1,-1)*u--(8.5,-1)*u--(8.5,6)*u--(-1,6)*u--cycle withcolor \mpcolor{red};
85 % endfig;
86 % }
87
88
89 % \section{tikz}
90
91 % \buildMeshBW[tikz,print=points, meshpoint = I,
92 % color=red]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(3,1);(6,1.5)}
93
94 % \buildMeshBW[tikz,mode=ext, color=red]{mesh.txt}
95
96 % \drawPointsMesh[tikz,mode=ext,bbox = show,
97 % color=red,print=points]{mesh.txt}
98 % \drawPointsMesh[tikz,mode=ext,bbox = show, color=red]{mesh.txt}
99
100 % \buildMeshBWinc[tikz,mode=ext,bbox = show, colorBbox = blue]{mesh.txt}{%
101 % }%
102 % {%
103 % \draw[color = red] (0,0) -- (3,3);
104 % }
105
106 % \meshAddPointBW[
107 % tikz,
108 % color = green,
109 % meshpoint = x,
110 % colorBack=red!10,
111 % colorNew = green!20!red,
112 % scale=0.6cm,
113 % step=cavity]
114 % {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
115
116 % \meshAddPointBWinc[
117 % tikz,
118 % meshpoint = x,
119 % colorBack=red!10,
120 % colorNew = green!20!red,
121 % scale=0.6cm,
122 % step=badtriangles,
123 % newpoint = y,
124 % bbox = show,
125 % colorBbox = blue!20,
126 % ]{(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
127 % {}{\draw[color=green] (0,0) -- (3,3);}
128
129 % \meshAddPointBW[
130 % tikz,
131 % meshpoint = x,
132 % colorBack=red!10,
133 % colorNew = green!20!red,
134 % scale=0.6cm,
135 % step=badtriangles,
136 % newpoint = y,
137 % bbox = show,
138 % colorBbox = black
139 % ]
140 % {(0,0);(3.5,3);(7,0);(7.5,5);(1.61,3.14);(6,4)}{(3,1)}
141
142
143 % % \def\CircumPoint{y}
144 % % \luampcolor
145 % % \directlua{
146 % % buildVoronoiMP("mesh.txt","ext","points","","1cm","show")
147 % % }
148 % \buildVoronoiBW[mode=ext]{mesh.txt}
149 % \buildVoronoiBW[mode=ext,delaunay=show,colorVoronoi=green!60!blue]{mesh.txt}\par
150 % \buildVoronoiBW[mode=ext,print=points,delaunay=show,bbox=show,meshpoint=x,circumpoint=y]{mesh.txt}
151
152
153 % \buildVoronoiBW[tikz,mode=ext]{mesh.txt}
154 % \buildVoronoiBW[tikz,mode=ext,delaunay=show,colorVoronoi=green!60!blue]{mesh.txt}\par
155 % \buildVoronoiBW[tikz,mode=ext,print=points,delaunay=show,bbox=show,meshpoint=x,circumpoint=y]{mesh.txt}
156
157 % \buildVoronoiBWinc[mode=ext]{mesh.txt}{beginfig(0);}{endfig;}
158 % \buildVoronoiBWinc[tikz,mode=ext,print=points]{mesh.txt}{}{}
159
160
161 % \buildVoronoiBWinc[tikz,mode=ext,print=points,delaunay=show,meshpoint=x,circumpoint=y]{mesh.txt}{}{\draw[color=blue,thick] (0,0)--(3,3);}
162
163 % \def\MeshPoints{P}
164 % \directlua{
165 % drawGmshMP("maillage.msh","points","8cm")
166 % }\par
167 % \directlua{
168 % gmshVoronoiMP("maillage.msh","none","8cm","none")
169 % }
170
171 % \drawGmsh[tikz,scale=8cm]{maillage.msh}
172
173 % \gmshVoronoi[tikz,scale=8cm,print=points,delaunay=show]{maillage.msh}
174
175
176 \meshPolygon[step=polygon,scale=3cm]{(0,0);(1,0);(1,0.5);(0.5,1);(-0.3,0.3)}
177 \meshPolygon[step=grid,scale=3cm]{(0,0);(1,0);(1,0.5);(0.5,1);(-0.3,0.3)}
178 \meshPolygon[step=points,scale=3cm]{(0,0);(1,0);(1,0.5);(0.5,1);(-0.3,0.3)}
179 \meshPolygon[step=mesh,scale=3cm,print=dotpoints]{(0,0);(1,0);(1,0.5);(0.5,1);(-0.3,0.3)}
180 \end{document}

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.