|
| 1 | +% tex/conc/mp/3d37.mp 2018-1-10 Alan U. Kennington. |
| 2 | +% $Id$ |
| 3 | +% Interpretation of exterior derivative. |
| 4 | + |
| 5 | +input 3dmax |
| 6 | +input mapmax |
| 7 | +% verbatimtex |
| 8 | +% \input akmath |
| 9 | +% etex |
| 10 | + |
| 11 | +%%%%%%%%%%%%%%%%%%%%%%%%% |
| 12 | +% figure 1 % |
| 13 | +%%%%%%%%%%%%%%%%%%%%%%%%% |
| 14 | +beginfig(1); |
| 15 | + |
| 16 | +numeric A[][]; % The current 4x3 transformation matrix. |
| 17 | +numeric p[][], q[][]; % Lists of 3-vectors. |
| 18 | +pair w[]; % Coordinate pairs on the drawing canvas. |
| 19 | +numeric s; % The screen scale factor. |
| 20 | +path pat[]; |
| 21 | +color col[]; |
| 22 | + |
| 23 | +penAXIS := 0.5bp; |
| 24 | +penLN := 0.5bp; |
| 25 | +penTHICK := 1.2bp; |
| 26 | +penPT := 3.0bp; |
| 27 | +penBIGPT := 3.5bp; |
| 28 | +penARROW := 0.5bp; |
| 29 | + |
| 30 | +if 0=1: |
| 31 | +col0 := red; |
| 32 | +col1 := green; |
| 33 | +col2 := blue; |
| 34 | +col3 := black; |
| 35 | +else: |
| 36 | +col0 := black; |
| 37 | +col1 := black; |
| 38 | +col2 := 0.6white; |
| 39 | +col3 := 0.6white; |
| 40 | +fi |
| 41 | +col8 := 0.5white; |
| 42 | +col9 := 0.9white; |
| 43 | + |
| 44 | +Z_set(p0)(55, -90, 50); % Position of viewer. |
| 45 | +% Z_set(q0)(0, 0, 0); % Centre of picture. |
| 46 | +Z_set(q0)(6, 6, 6); % Centre of picture. |
| 47 | + |
| 48 | +A_set_pq(A)(p0)(q0); |
| 49 | +% A_print(A); |
| 50 | + |
| 51 | +s := 2000; |
| 52 | +unit := 10; |
| 53 | + |
| 54 | +%============================================================================== |
| 55 | +% Coordinates for the axes. |
| 56 | +Z_set(p10)(0cm, 0cm, 0cm); % Origin. |
| 57 | +Z_set(p11)(0.9unit, 0cm, 0cm); % X axis. |
| 58 | +Z_set(p12)(0cm, 0.9unit, 0cm); % Y axis. |
| 59 | +Z_set(p13)(0cm, 0cm, 0.9unit); % Z axis. |
| 60 | + |
| 61 | +A_calc_w(A)(w11)(p11)(s); |
| 62 | +A_calc_w(A)(w12)(p12)(s); |
| 63 | +A_calc_w(A)(w13)(p13)(s); |
| 64 | +A_calc_w(A)(w10)(p10)(s); |
| 65 | + |
| 66 | +% Draw the axes. |
| 67 | +pickup pencircle scaled penAXIS; |
| 68 | +drawarrow w10--w11; |
| 69 | +drawarrow w10--w12; |
| 70 | +drawarrow w10--w13; |
| 71 | + |
| 72 | +pickup pencircle scaled penPT; |
| 73 | +draw w10; |
| 74 | + |
| 75 | +label.bot(btex $x_0$ etex, w11+(0,-2pt)); |
| 76 | +label.lrt(btex $x_1$ etex, w12+(0,0pt)); |
| 77 | +label.lft(btex $x_2$ etex, w13+(-2pt,0pt)); |
| 78 | + |
| 79 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 80 | +% Nominal top-left origins for m = 0 and m = 1. Origin of m=2 diagram is (0,0). |
| 81 | +w100 := w10 + (-4cm,5cm); |
| 82 | +w120 := w10 + (-4cm,0cm); |
| 83 | + |
| 84 | +%============================================================================== |
| 85 | +% Coordinates for the hyper-rectangle. |
| 86 | +va := 0.10unit; % Origin of local variation. |
| 87 | +vb := 0.20unit; |
| 88 | +vc := 0.20unit; |
| 89 | + |
| 90 | +% Dimensions of the hyper-rectangle in cubits. (One cubit = 0.523 metres.) |
| 91 | +waC := 20; |
| 92 | +wbC := 18; |
| 93 | +wcC := 12; |
| 94 | +sC := 20; % Scale factor. |
| 95 | + |
| 96 | +wa := (waC/sC)*unit; % Dimensions in scaled space. |
| 97 | +wb := (wbC/sC)*unit; |
| 98 | +wc := (wcC/sC)*unit; |
| 99 | + |
| 100 | +Z_set(p20)(va, vb, vc); % Origin of local variation. |
| 101 | + |
| 102 | +Z_set(p21)(va+wa, vb, vc); % X axis. |
| 103 | +Z_set(p22)(va, vb+wb, vc); % Y axis. |
| 104 | +Z_set(p23)(va, vb, vc+wc); % Z axis. |
| 105 | + |
| 106 | +Z_set(p24)(va+wa, vb+wb, vc); % X-Y. |
| 107 | +Z_set(p25)(va, vb+wb, vc+wc); % Y-Z. |
| 108 | +Z_set(p26)(va+wa, vb, vc+wc); % X-Z. |
| 109 | + |
| 110 | +Z_set(p27)(va+wa, vb+wb, vc+wc); % X-Y-Z. |
| 111 | + |
| 112 | +A_calc_w(A)(w20)(p20)(s); |
| 113 | + |
| 114 | +A_calc_w(A)(w21)(p21)(s); |
| 115 | +A_calc_w(A)(w22)(p22)(s); |
| 116 | +A_calc_w(A)(w23)(p23)(s); |
| 117 | + |
| 118 | +A_calc_w(A)(w24)(p24)(s); |
| 119 | +A_calc_w(A)(w25)(p25)(s); |
| 120 | +A_calc_w(A)(w26)(p26)(s); |
| 121 | + |
| 122 | +A_calc_w(A)(w27)(p27)(s); |
| 123 | + |
| 124 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 125 | +% Faces of hyper-rectangle. |
| 126 | +pat1 := w20--w22--w25--w23--cycle; % O Y YZ Z |
| 127 | +pat2 := w20--w23--w26--w21--cycle; % O Z XZ X |
| 128 | +pat3 := w20--w21--w24--w22--cycle; % O X XY Y |
| 129 | + |
| 130 | +pat5 := w22--w25--w27--w24--cycle; % Y YZ XYZ XY |
| 131 | + |
| 132 | +% Fill in the faces of the hyper-rectangle. |
| 133 | +if 0=1: |
| 134 | +pickup pencircle scaled penLN; |
| 135 | +fill pat1 withcolor col9; |
| 136 | +fill pat3 withcolor col9; |
| 137 | +fill pat5 withcolor col9; |
| 138 | +fill pat1 withcolor col0; |
| 139 | +fill pat3 withcolor col1; |
| 140 | +fill pat5 withcolor col2; |
| 141 | +fi |
| 142 | + |
| 143 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 144 | +% Draw the edges of the hyper-rectangle. |
| 145 | +pickup pencircle scaled penLN; |
| 146 | +% draw w20--w21; |
| 147 | +% draw w20--w22; |
| 148 | +% draw w20--w23; |
| 149 | + |
| 150 | +draw w21--w24; |
| 151 | +draw w21--w26; |
| 152 | + |
| 153 | +draw w22--w24; |
| 154 | +draw w22--w25; |
| 155 | +draw w23--w25; |
| 156 | +draw w23--w26; |
| 157 | + |
| 158 | +draw w24--w27; |
| 159 | +draw w25--w27; |
| 160 | +draw w26--w27; |
| 161 | + |
| 162 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 163 | +% Draw the main vectors. |
| 164 | +pickup pencircle scaled penTHICK; |
| 165 | +drawarrow w20--w21; |
| 166 | +drawarrow w20--w22; |
| 167 | +drawarrow w20--w23; |
| 168 | + |
| 169 | +pickup pencircle scaled penBIGPT; |
| 170 | +draw w20; |
| 171 | + |
| 172 | +label.llft(btex $x$ etex, w20); |
| 173 | +label.bot(btex\strut $V_0$ etex, w21); |
| 174 | +label.urt(btex\strut $V_1$ etex, w22); |
| 175 | +label.ulft(btex $V_2$ etex, w23); |
| 176 | + |
| 177 | +%============================================================================== |
| 178 | +% Draw the orientations of all 6 faces of the hyper-rectangle. |
| 179 | + |
| 180 | +dZ := 0.05unit; % Semi-width of orientation loops. |
| 181 | + |
| 182 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 183 | +% The YZ plane for term 0. |
| 184 | +Z_set(p30)(va, vb+wb/2, vc+wc/2); % YZ. |
| 185 | +Z_set(p31)(va, vb+wb/2-dZ, vc+wc/2-dZ); |
| 186 | +Z_set(p32)(va, vb+wb/2+dZ, vc+wc/2-dZ); |
| 187 | +Z_set(p33)(va, vb+wb/2+dZ, vc+wc/2+dZ); |
| 188 | +Z_set(p34)(va, vb+wb/2-dZ, vc+wc/2+dZ); |
| 189 | + |
| 190 | +Z_set(p40)(va+wa, vb+wb/2, vc+wc/2); % X + YZ. |
| 191 | +Z_set(p41)(va+wa, vb+wb/2-dZ, vc+wc/2-dZ); |
| 192 | +Z_set(p42)(va+wa, vb+wb/2+dZ, vc+wc/2-dZ); |
| 193 | +Z_set(p43)(va+wa, vb+wb/2+dZ, vc+wc/2+dZ); |
| 194 | +Z_set(p44)(va+wa, vb+wb/2-dZ, vc+wc/2+dZ); |
| 195 | + |
| 196 | +A_calc_w(A)(w30)(p30)(s); |
| 197 | +A_calc_w(A)(w31)(p31)(s); |
| 198 | +A_calc_w(A)(w32)(p32)(s); |
| 199 | +A_calc_w(A)(w33)(p33)(s); |
| 200 | +A_calc_w(A)(w34)(p34)(s); |
| 201 | + |
| 202 | +A_calc_w(A)(w40)(p40)(s); |
| 203 | +A_calc_w(A)(w41)(p41)(s); |
| 204 | +A_calc_w(A)(w42)(p42)(s); |
| 205 | +A_calc_w(A)(w43)(p43)(s); |
| 206 | +A_calc_w(A)(w44)(p44)(s); |
| 207 | + |
| 208 | +pickup pencircle scaled penLN; |
| 209 | +drawarrow reverse (w34--w31) withcolor col0; |
| 210 | +drawarrow reverse (w33--w34) withcolor col1; |
| 211 | +drawarrow reverse (w32--w33) withcolor col2; |
| 212 | +drawarrow reverse (w31--w32) withcolor col3; |
| 213 | + |
| 214 | +drawarrow w41--w42 withcolor col0; |
| 215 | +drawarrow w42--w43 withcolor col1; |
| 216 | +drawarrow w43--w44 withcolor col2; |
| 217 | +drawarrow w44--w41 withcolor col3; |
| 218 | + |
| 219 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 220 | +% The XZ plane for term 1. |
| 221 | +Z_set(p50)(va+wa/2, vb, vc+wc/2); % XZ. |
| 222 | +Z_set(p51)(va+wa/2-dZ, vb, vc+wc/2-dZ); |
| 223 | +Z_set(p52)(va+wa/2-dZ, vb, vc+wc/2+dZ); |
| 224 | +Z_set(p53)(va+wa/2+dZ, vb, vc+wc/2+dZ); |
| 225 | +Z_set(p54)(va+wa/2+dZ, vb, vc+wc/2-dZ); |
| 226 | + |
| 227 | +Z_set(p60)(va+wa/2, vb+wb, vc+wc/2); % Y + XZ. |
| 228 | +Z_set(p61)(va+wa/2-dZ, vb+wb, vc+wc/2-dZ); |
| 229 | +Z_set(p62)(va+wa/2-dZ, vb+wb, vc+wc/2+dZ); |
| 230 | +Z_set(p63)(va+wa/2+dZ, vb+wb, vc+wc/2+dZ); |
| 231 | +Z_set(p64)(va+wa/2+dZ, vb+wb, vc+wc/2-dZ); |
| 232 | + |
| 233 | +A_calc_w(A)(w50)(p50)(s); |
| 234 | +A_calc_w(A)(w51)(p51)(s); |
| 235 | +A_calc_w(A)(w52)(p52)(s); |
| 236 | +A_calc_w(A)(w53)(p53)(s); |
| 237 | +A_calc_w(A)(w54)(p54)(s); |
| 238 | + |
| 239 | +A_calc_w(A)(w60)(p60)(s); |
| 240 | +A_calc_w(A)(w61)(p61)(s); |
| 241 | +A_calc_w(A)(w62)(p62)(s); |
| 242 | +A_calc_w(A)(w63)(p63)(s); |
| 243 | +A_calc_w(A)(w64)(p64)(s); |
| 244 | + |
| 245 | +pickup pencircle scaled penLN; |
| 246 | +drawarrow reverse (w54--w51) withcolor col0; |
| 247 | +drawarrow reverse (w53--w54) withcolor col1; |
| 248 | +drawarrow reverse (w52--w53) withcolor col2; |
| 249 | +drawarrow reverse (w51--w52) withcolor col3; |
| 250 | + |
| 251 | +drawarrow w61--w62 withcolor col0; |
| 252 | +drawarrow w62--w63 withcolor col1; |
| 253 | +drawarrow w63--w64 withcolor col2; |
| 254 | +drawarrow w64--w61 withcolor col3; |
| 255 | + |
| 256 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 257 | +% The XY plane for term 2. |
| 258 | +Z_set(p70)(va+wa/2, vb+wb/2, vc); % XY. |
| 259 | +Z_set(p71)(va+wa/2-dZ, vb+wb/2-dZ, vc); |
| 260 | +Z_set(p72)(va+wa/2+dZ, vb+wb/2-dZ, vc); |
| 261 | +Z_set(p73)(va+wa/2+dZ, vb+wb/2+dZ, vc); |
| 262 | +Z_set(p74)(va+wa/2-dZ, vb+wb/2+dZ, vc); |
| 263 | + |
| 264 | +Z_set(p80)(va+wa/2, vb+wb/2, vc+wc); % Z + XY. |
| 265 | +Z_set(p81)(va+wa/2-dZ, vb+wb/2-dZ, vc+wc); |
| 266 | +Z_set(p82)(va+wa/2+dZ, vb+wb/2-dZ, vc+wc); |
| 267 | +Z_set(p83)(va+wa/2+dZ, vb+wb/2+dZ, vc+wc); |
| 268 | +Z_set(p84)(va+wa/2-dZ, vb+wb/2+dZ, vc+wc); |
| 269 | + |
| 270 | +A_calc_w(A)(w70)(p70)(s); |
| 271 | +A_calc_w(A)(w71)(p71)(s); |
| 272 | +A_calc_w(A)(w72)(p72)(s); |
| 273 | +A_calc_w(A)(w73)(p73)(s); |
| 274 | +A_calc_w(A)(w74)(p74)(s); |
| 275 | + |
| 276 | +A_calc_w(A)(w80)(p80)(s); |
| 277 | +A_calc_w(A)(w81)(p81)(s); |
| 278 | +A_calc_w(A)(w82)(p82)(s); |
| 279 | +A_calc_w(A)(w83)(p83)(s); |
| 280 | +A_calc_w(A)(w84)(p84)(s); |
| 281 | + |
| 282 | +pickup pencircle scaled penLN; |
| 283 | +drawarrow reverse (w74--w71) withcolor col0; |
| 284 | +drawarrow reverse (w73--w74) withcolor col1; |
| 285 | +drawarrow reverse (w72--w73) withcolor col2; |
| 286 | +drawarrow reverse (w71--w72) withcolor col3; |
| 287 | + |
| 288 | +drawarrow w81--w82 withcolor col0; |
| 289 | +drawarrow w82--w83 withcolor col1; |
| 290 | +drawarrow w83--w84 withcolor col2; |
| 291 | +drawarrow w84--w81 withcolor col3; |
| 292 | + |
| 293 | +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 294 | +% Some labels. |
| 295 | +w90 := w40 + (0pt,-18pt); |
| 296 | +w91 := w40 + (0pt,-96pt); |
| 297 | +w92 := w60 + (3pt,13pt); |
| 298 | +w93 := w60 + (20pt,55pt); |
| 299 | +w94 := w80 + (-15pt,4pt); |
| 300 | +w95 := w80 + (-90pt,30pt); |
| 301 | +w96 := w80 + (-90pt,30pt); |
| 302 | + |
| 303 | +pickup pencircle scaled penARROW; |
| 304 | +drawarrow w91--w90 dashed evenly; |
| 305 | +label.bot(btex $\partial_{V_0}\omega(x)(V_1,V_2)$ etex, w91); |
| 306 | + |
| 307 | +drawarrow w93--w92 dashed evenly; |
| 308 | +label.top(btex $\partial_{V_1}\omega(x)(V_2,V_0)$ etex, w93); |
| 309 | + |
| 310 | +drawarrow w95--w94 dashed evenly; |
| 311 | +label.lft(btex $\partial_{V_2}\omega(x)(V_0,V_1)$ etex, w95); |
| 312 | + |
| 313 | +label.top(btex $m=2$ etex, w25+(-20pt,0pt)); |
| 314 | + |
| 315 | +%============================================================================== |
| 316 | +% The case m = 0. |
| 317 | +dQ := 2cm; |
| 318 | +dL := 14pt; |
| 319 | +w101 := w100 + (0,0); |
| 320 | +w102 := w100 + (dQ,0); |
| 321 | +w103 := 0.5[w101,w102]+(0,dL); |
| 322 | +w104 := 0.5[w101,w102]+(0,-dL); |
| 323 | + |
| 324 | +pickup pencircle scaled penLN; |
| 325 | +draw w101--w102 dashed evenly withcolor col8; |
| 326 | + |
| 327 | +pickup pencircle scaled penPT; |
| 328 | +draw w101; |
| 329 | +draw w102; |
| 330 | + |
| 331 | +label.top(btex\strut $-$ etex, w101); |
| 332 | +label.top(btex\strut $+$ etex, w102); |
| 333 | +label.bot(btex\strut $x$ etex, w101); |
| 334 | +label.bot(btex\strut $V_0$ etex, w102); |
| 335 | + |
| 336 | +label.top(btex $m=0$ etex, w103); |
| 337 | +label.bot(btex $\partial_{V_0}\omega(x)()$ etex, w104); |
| 338 | + |
| 339 | +%============================================================================== |
| 340 | +% The case m = 1. |
| 341 | +w121 := w120 + (0,0); |
| 342 | +w122 := w120 + (dQ,0); |
| 343 | +w123 := w120 + (dQ,dQ); |
| 344 | +w124 := w120 + (0,dQ); |
| 345 | + |
| 346 | +w130 := 0.5[w124,w123] + (0,dL); |
| 347 | +w131 := 0.5[w121,w122] + (0,-dL); |
| 348 | +w132 := 0.5[w121,w122] + (0,-2dL); |
| 349 | + |
| 350 | +pickup pencircle scaled penARROW; |
| 351 | +drawarrow w121--w122 withcolor col0; |
| 352 | +drawarrow w122--w123 withcolor col1; |
| 353 | +drawarrow w123--w124 withcolor col2; |
| 354 | +drawarrow w124--w121 withcolor col3; |
| 355 | + |
| 356 | +pickup pencircle scaled penPT; |
| 357 | +draw w121; |
| 358 | + |
| 359 | +label.llft(btex\strut $x$ etex, w121); |
| 360 | +label.lrt(btex\strut $V_0$ etex, w122); |
| 361 | +label.ulft(btex\strut $V_1$ etex, w124); |
| 362 | + |
| 363 | +label.lft(btex $-$ etex, 0.5[w121,w124]); |
| 364 | +label.rt(btex $+$ etex, 0.5[w122,w123]); |
| 365 | +label.bot(btex $+$ etex, 0.5[w121,w122]); |
| 366 | +label.top(btex $-$ etex, 0.5[w124,w123]); |
| 367 | + |
| 368 | +label.top(btex $m=1$ etex, w130); |
| 369 | +label.bot(btex $\partial_{V_0}\omega(x)(V_1)$ etex, w131); |
| 370 | +label.bot(btex $\llap{${}-{}$}\partial_{V_1}\omega(x)(V_0)$ etex, w132); |
| 371 | + |
| 372 | +endfig; |
| 373 | +end |
0 commit comments