1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721
|
%%%% dodec_02.ldf
%%%% Created by Laurence D. Finston (LDF) Tue Oct 16 22:49:15 CEST 2007
%% * (1) Copyright and License.
%%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing.
%%%% Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 The Free Software Foundation
%%%% GNU 3DLDF is free software; you can redistribute it and/or modify
%%%% it under the terms of the GNU General Public License as published by
%%%% the Free Software Foundation; either version 3 of the License, or
%%%% (at your option) any later version.
%%%% GNU 3DLDF is distributed in the hope that it will be useful,
%%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%%%% GNU General Public License for more details.
%%%% You should have received a copy of the GNU General Public License
%%%% along with GNU 3DLDF; if not, write to the Free Software
%%%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
%%%% GNU 3DLDF is a GNU package.
%%%% It is part of the GNU Project of the
%%%% Free Software Foundation
%%%% and is published under the GNU General Public License.
%%%% See the website http://www.gnu.org
%%%% for more information.
%%%% GNU 3DLDF is available for downloading from
%%%% http://www.gnu.org/software/3dldf/LDF.html.
%%%% Please send bug reports to Laurence.Finston@gmx.de
%%%% The mailing list help-3dldf@gnu.org is available for people to
%%%% ask other users for help.
%%%% The mailing list info-3dldf@gnu.org is for sending
%%%% announcements to users. To subscribe to these mailing lists, send an
%%%% email with ``subscribe <email-address>'' as the subject.
%%%% The author can be contacted at:
%%%% Laurence D. Finston
%%%% c/o Free Software Foundation, Inc.
%%%% 51 Franklin St, Fifth Floor
%%%% Boston, MA 02110-1301
%%%% USA
%%%% Laurence.Finston@gmx.de
%% Run like this:
%% 3dldf dodec_02.ldf
%% mpost dodec_02.mp
%% tex dodec_02.txt
%% dvips -o dodec_02.ps dodec_02.dvi
%% All on one line:
if false:
3dldf dodec_02.ldf; mpost dodec_02.mp; tex dodec_02.txt; \
dvips -o dodec_02.ps dodec_02.dvi
fi;
%% View using Ghostview like this:
%% gv dodec_02.ps &
% * (1) Beginning of 3DLDF code.
%% ** (2) draw_dodecahedron_net
input "dodec_02.lmc";
%% *** (3) Global declarations and initializations
focus f;
set f with_position (3, 2, -20)
with_direction (3, 2, 10) with_distance 20;
polyhedron d[];
point p[];
point n[]; %% normals
point c[]; %% centers
reg_polygon r[];
string s;
%% *** (3) Figure 1
beginfig(1);
%% !!TODO: Find out why I couldn't make `path_pen' and `dot_pen' as typed
%% arguments!
%% LDF 2007.10.16.
draw_dodecahedron_net {4, true, 6, .375mm, .75mm, identity};
endfig with_projection parallel_x_z no_sort;
%% *** (3) Figure 2
beginfig(2);
d0 := unit_dodecahedron scaled 2 rotated (180, 190);
draw d0;
for i = 0 upto 11:
r[i] := get_reg_polygon (i) d0;
c[i] := get_center r[i];
if false:
s := decimal i;
label(s, c[i]);
fi;
endfor;
if false:
for i = 0 upto 4:
s := "$2_" & decimal i & "$";
label.top(s, get_point (i) r2);
endfor;
for i = 0 upto 4:
s := "$9_" & decimal i & "$";
label.lft(s, get_point (i) r9);
endfor;
for i = 0 upto 4:
s := "$10_" & decimal i & "$";
label.rt(s, get_point (i) r10);
endfor;
fi;
label(1, c1);
label(2, c2);
label(9, c9);
label(11, c11);
label(10, c10);
%label(2, c2) with_text_color red;
%label.bot(1, c1) with_text_color blue;
% filldraw r1 with_draw_color blue;
% filldraw r2;
% filldraw r0;
% filldraw r6;
filldraw r1;
filldraw r2;
filldraw r9;
filldraw r10;
filldraw r11;
% filldraw r10;
% filldraw r11;
n1 := ((get_normal r1) * -1) shifted c1;
%label.urt("$n_1$", n1) with_text_color blue;
%drawarrow c1 -- n1 with_color blue;
endfig with_focus f no_sort;
%% *** (3) Figure 3
beginfig(3);
d0 := unit_dodecahedron scaled 2 rotated (180, 10);
draw d0;
for i = 0 upto 11:
r[i] := get_reg_polygon (i) d0;
c[i] := get_center r[i];
if false:
s := decimal i;
label(s, c[i]);
fi;
endfor;
filldraw r3;
filldraw r4;
filldraw r5;
filldraw r7;
filldraw r8;
% draw r0;
% draw r1;
% draw r2;
% draw r3;
% draw r5;
% draw r6;
% draw r7;
% draw r8;
% draw r9;
% draw r10;
% draw r11;
label(3, c3);
label(4, c4);
label(5, c5);
label(7, c7);
label(8, c8);
endfig with_focus f no_sort;
%% *** (3) Figure 4
beginfig(4);
transform t[];
t0 := identity rotated (0, 0, -90);
draw_dodecahedron_net {6, true, 6, .4mm, .75mm, t0};
rotate current_picture (0, -75);
endfig with_projection parallel_x_z no_sort;
%% *** (3) Figure 5. Pentagons for cutting out, 4cm.
%% **** (4) Declarations
path q[];
%% **** (4) Figure 5
beginfig(5);
%% ***** (5) First pentagon, r0
r0 := unit_pentagon scaled 2;
c0 := get_center r0;
%label("$r_0$", c0);
draw r0;
for i = 0 upto 4:
p[i] := get_point (i) r0;
endfor;
%dotlabel.top("$p_0$", p0);
%dotlabel.top("$p_1$", p1);
%dotlabel.top("$p_2$", p2);
%dotlabel.top("$p_3$", p3);
%dotlabel.top("$p_4$", p4);
j := 0;
for i = 0 upto 3:
q[i] += --;
p[10 + j] := unit_vector (p[i] - p[i + 1]) shifted p[i];
q[i] += p[10 + j];
j += 1;
p[10 + j] := unit_vector (p[i + 1] - p[i]) shifted p[i + 1];
q[i] += p[10 + j];
j += 1;
endfor;
p[18] := unit_vector (p[4] - p[0]) shifted p[4];
p[19] := unit_vector (p[0] - p[4]) shifted p[0];
q[4] := p[18] -- p[19];
%dotlabel.top("$p_{10}$", p10);
%dotlabel.top("$p_{11}$", p11);
%dotlabel.top("$p_{12}$", p12);
%dotlabel.top("$p_{13}$", p13);
%dotlabel.top("$p_{14}$", p14);
%dotlabel.top("$p_{15}$", p15);
%dotlabel.top("$p_{16}$", p16);
%dotlabel.top("$p_{17}$", p17);
%dotlabel.top("$p_{18}$", p18);
%dotlabel.top("$p_{19}$", p19);
for i := 0 upto 4:
draw q[i] dashed evenly;
endfor;
%% ***** (5) Second pentagon, r1
t0 := identity shifted by (p15 - p14);
r1 := r0 transformed t0;
draw r1;
c1 := get_center r1;
%
%label("$r_1$", c1);
for i = 0 upto 4:
p[20 + i] := get_point (i) r1;
q[20 + i] := q[i] transformed t0;
draw q[20 + i] dashed evenly;
endfor;
for i = 0 upto 9:
p[30 + i] := p[10 + i] transformed t0;
endfor;
%dotlabel.bot("$p_{20}$", p20);
%dotlabel.bot("$p_{21}$", p21);
%dotlabel.bot("$p_{22}$", p22);
%dotlabel.bot("$p_{23}$", p23);
%dotlabel.bot("$p_{24}$", p24);
%dotlabel.bot("$p_{30}$", p30);
%dotlabel.bot("$p_{31}$", p31);
%dotlabel.bot("$p_{32}$", p32);
%dotlabel.bot("$p_{33}$", p33);
%dotlabel.bot("$p_{34}$", p34);
%dotlabel.bot("$p_{35}$", p35);
%dotlabel.bot("$p_{36}$", p36);
%dotlabel.bot("$p_{37}$", p37);
%dotlabel.bot("$p_{38}$", p38);
%dotlabel.bot("$p_{39}$", p39);
%% ***** (5) Third pentagon, r2
r2 := r1 transformed t0;
c2 := get_center r2;
%
%label("$r_2$", c2);
draw r2;
for i = 0 upto 4:
p[40 + i] := get_point (i) r2;
q[40 + i] := q[i + 20] transformed t0;
draw q[40 + i] dashed evenly;
endfor;
for i = 0 upto 9:
p[50 + i] := p[30 + i] transformed t0;
endfor;
%dotlabel.bot("$p_{40}$", p40);
%dotlabel.bot("$p_{41}$", p41);
%dotlabel.bot("$p_{42}$", p42);
%dotlabel.bot("$p_{43}$", p43);
%dotlabel.bot("$p_{44}$", p44);
%dotlabel.bot("$p_{50}$", p50);
%dotlabel.bot("$p_{51}$", p51);
%dotlabel.bot("$p_{52}$", p52);
%dotlabel.bot("$p_{53}$", p53);
%dotlabel.bot("$p_{54}$", p54);
%dotlabel.bot("$p_{55}$", p55);
%dotlabel.bot("$p_{56}$", p56);
%dotlabel.bot("$p_{57}$", p57);
%dotlabel.bot("$p_{58}$", p58);
%dotlabel.bot("$p_{59}$", p59);
%% ***** (5) Fourth pentagon, r3
r3 := r2 transformed t0;
c3 := get_center r3;
%
%label("$r_3$", c3);
draw r3;
for i = 0 upto 4:
p[60 + i] := get_point (i) r3;
q[60 + i] := q[i + 40] transformed t0;
draw q[60 + i] dashed evenly;
endfor;
for i = 0 upto 9:
p[70 + i] := p[50 + i] transformed t0;
endfor;
%dotlabel.bot("$p_{60}$", p60);
%dotlabel.bot("$p_{61}$", p61);
%dotlabel.bot("$p_{62}$", p62);
%dotlabel.bot("$p_{63}$", p63);
%dotlabel.bot("$p_{64}$", p64);
%dotlabel.bot("$p_{70}$", p70);
%dotlabel.bot("$p_{71}$", p71);
%dotlabel.bot("$p_{72}$", p72);
%dotlabel.bot("$p_{73}$", p73);
%dotlabel.bot("$p_{74}$", p74);
%dotlabel.bot("$p_{75}$", p75);
%dotlabel.bot("$p_{76}$", p76);
%dotlabel.bot("$p_{77}$", p77);
%dotlabel.bot("$p_{78}$", p78);
%dotlabel.bot("$p_{79}$", p79);
%for i = 0 upto 3:
% filldraw r[i];
%endfor;
%% ***** (5) Second row
t0 := identity shifted by (p16 - p17);
for i = 0 upto 3:
c[i] *= r[i] *= t0;
s := "$r_{" & decimal i & "}$";
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t0;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
endfor;
%% ***** (5) Third row
t1 := identity shifted by (p13 - p12);
for i = 0 upto 3:
s := "$r_{" & decimal i & "}$";
c[i] *= r[i] *= t1;
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t1;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
% label(s, c[i]);
endfor;
%% ***** (5) Fourth row
for i = 0 upto 3:
s := "$r_{" & decimal i & "}$";
c[i] *= r[i] *= t0;
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t0;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
endfor;
%% ***** (5) Fifth row
for i = 0 upto 3:
s := "$r_{" & decimal i & "}$";
c[i] *= r[i] *= t1;
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t1;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
endfor;
%% ***** (5) Sixth row
for i = 0 upto 3:
s := "$r_{" & decimal i & "}$";
c[i] *= r[i] *= t0;
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t0;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
endfor;
%% ***** (5) End of figure 5
endfig with_projection parallel_x_z no_sort;
%% *** (3) Figure 6
beginfig(6);
%% ***** (5) First pentagon, r0
r0 := unit_pentagon scaled 3;
draw r0;
c0 := get_center r0;
%
%label("$r_0$", c0);
for i = 0 upto 4:
p[i] := get_point (i) r0;
endfor;
%dotlabel.top("$p_0$", p0);
%dotlabel.top("$p_1$", p1);
%dotlabel.top("$p_2$", p2);
%dotlabel.top("$p_3$", p3);
%dotlabel.top("$p_4$", p4);
j := 0;
for i = 0 upto 3:
q[i] := null_path;
q[i] += --;
p[10 + j] := unit_vector (p[i] - p[i + 1]) shifted p[i];
q[i] += p[10 + j];
j += 1;
p[10 + j] := unit_vector (p[i + 1] - p[i]) shifted p[i + 1];
q[i] += p[10 + j];
j += 1;
draw q[i] dashed evenly;
endfor;
p[18] := unit_vector (p[4] - p[0]) shifted p[4];
p[19] := unit_vector (p[0] - p[4]) shifted p[0];
q[4] := p[18] -- p[19];
draw q[4] dashed evenly;
%dotlabel.top("$p_{10}$", p10);
%dotlabel.top("$p_{11}$", p11);
%dotlabel.top("$p_{12}$", p12);
%dotlabel.top("$p_{13}$", p13);
%dotlabel.top("$p_{14}$", p14);
%dotlabel.top("$p_{15}$", p15);
%dotlabel.top("$p_{16}$", p16);
%dotlabel.top("$p_{17}$", p17);
%dotlabel.top("$p_{18}$", p18);
%dotlabel.top("$p_{19}$", p19);
%% ***** (5) Second pentagon, r1
p100 := p15 shifted 1;
t0 := identity shifted by (p100 - p14);
r1 := r0 transformed t0;
c1 := get_center r1;
%
%label("$r_1$", c1);
draw r1;
for i = 0 upto 4:
p[20 + i] := get_point (i) r1;
q[20 + i] := q[i] transformed t0;
draw q[20 + i] dashed evenly;
endfor;
for i = 0 upto 9:
p[30 + i] := p[10 + i] transformed t0;
endfor;
%dotlabel.bot("$p_{20}$", p20);
%dotlabel.bot("$p_{21}$", p21);
%dotlabel.bot("$p_{22}$", p22);
%dotlabel.bot("$p_{23}$", p23);
%dotlabel.bot("$p_{24}$", p24);
%dotlabel.bot("$p_{30}$", p30);
%dotlabel.bot("$p_{31}$", p31);
%dotlabel.bot("$p_{32}$", p32);
%dotlabel.bot("$p_{33}$", p33);
%dotlabel.bot("$p_{34}$", p34);
%dotlabel.bot("$p_{35}$", p35);
%dotlabel.bot("$p_{36}$", p36);
%dotlabel.bot("$p_{37}$", p37);
%dotlabel.bot("$p_{38}$", p38);
%dotlabel.bot("$p_{39}$", p39);
%% ***** (5) Third pentagon, r2
r2 := r1 transformed t0;
c2 := get_center r2;
%
%label("$r_2$", c2);
draw r2;
for i = 0 upto 4:
p[40 + i] := get_point (i) r2;
q[40 + i] := q[i + 20] transformed t0;
draw q[40 + i] dashed evenly;
endfor;
for i = 0 upto 9:
p[50 + i] := p[30 + i] transformed t0;
endfor;
%dotlabel.bot("$p_{40}$", p40);
%dotlabel.bot("$p_{41}$", p41);
%dotlabel.bot("$p_{42}$", p42);
%dotlabel.bot("$p_{43}$", p43);
%dotlabel.bot("$p_{44}$", p44);
%dotlabel.bot("$p_{50}$", p50);
%dotlabel.bot("$p_{51}$", p51);
%dotlabel.bot("$p_{52}$", p52);
%dotlabel.bot("$p_{53}$", p53);
%dotlabel.bot("$p_{54}$", p54);
%dotlabel.bot("$p_{55}$", p55);
%dotlabel.bot("$p_{56}$", p56);
%dotlabel.bot("$p_{57}$", p57);
%dotlabel.bot("$p_{58}$", p58);
%dotlabel.bot("$p_{59}$", p59);
%% ***** (5) Second row
t0 := identity shifted (0, 0, -6);
for i = 0 upto 2:
s := "$r_{" & decimal i & "}$";
c[i] *= r[i] *= t0;
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t0;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
endfor;
%% ***** (5) Third row
for i = 0 upto 2:
s := "$r_{" & decimal i & "}$";
c[i] *= r[i] *= t0;
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t0;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
endfor;
%% ***** (5) Fourth row
for i = 0 upto 2:
s := "$r_{" & decimal i & "}$";
c[i] *= r[i] *= t0;
draw r[i];
% label(s, c[i]);
endfor;
for i = 0 upto 4:
q[i] *= q[20 + i] *= q[40 + i] *= q[60 + i] *= t0;
draw q[i] dashed evenly;
draw q[20 + i] dashed evenly;
draw q[40 + i] dashed evenly;
draw q[60 + i] dashed evenly;
endfor;
%% ***** (5) End of figure 6
endfig with_projection parallel_x_z no_sort;
%% **** (4)
%% *** (3) End of 3DLDF code
verbatim_metapost "end;";
end;
%% ** (2)
%% * (1) Emacs-Lisp code for use in indirect buffers when using the
%% GNU Emacs editor. The local variable list is not evaluated when an
%% indirect buffer is visited, so it's necessary to evaluate the
%% following s-expression in order to use the facilities normally
%% accessed via the local variables list.
%% \initials{LDF 2004.02.12}.
%% (progn (metafont-mode) (outline-minor-mode t) (setq fill-column 80))
%% * (1) Local variables for Emacs.
%% Local Variables:
%% mode:Metafont
%% eval:(outline-minor-mode t)
%% eval:(read-abbrev-file abbrev-file-name)
%% outline-regexp:"%% [*\f]+"
%% End:
|