%% polyryth.ldf %% Created by Laurence D. Finston (LDF) Fri May 11 13:10:35 CEST 2012 %% $Id: polyrhyt.ldf,v 1.5 2013/06/05 16:44:52 lfinsto1 Exp $ %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. %%%% Copyright (C) 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 '' 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 %% Created: May 11, 2012 %% Last updated: May 24, 2012 %% Run like this: %% 3dldf polyrhyt.ldf %% mpost polyrhyt.mp %% tex polyrhyt.txt %% dvips -o polyrhyt.ps polyrhyt.dvi %% ps2pdf polyrhyt.ps %% All on one line: if false: 3dldf polyrhyt.ldf && mpost polyrhyt.mp && tex polyrhyt.txt && \ dvips -o polyrhyt.ps polyrhyt.dvi \ && ps2pdf polyrhyt.ps fi; %% View the PostScript file using Ghostview like this: %% gv polyrhyt.ps & %% or with GNU Ghostview like this: %% ggv polyrhyt.ps & %% View the PDF file with Acrobat Reader like this: %% acroread polyrhyt.pdf & %% * (1) Beginning of 3DLDF code. input "polyrhyt.lmc"; %% Figure 0 must be generated. beginfig(0); drawdot origin; endfig with_projection parallel_x_y no_sort; if true: %% ** (2) 2 -- 3 %% *** (3) Figure 1: 2 over 3 beginfig(1); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 2, 3, 6, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 2: 3 over 2 beginfig(2); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 3, 2, 6, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 3 -- 4 %% *** (3) Figure 3: 3 over 4 beginfig(3); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 3, 4, 12, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 4: 4 over 3 beginfig(4); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 4, 3, 12, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 3 -- 5 %% *** (3) Figure 5: 3 over 5 beginfig(5); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 3, 5, 15, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 6: 5 over 3 beginfig(6); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 5, 3, 15, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 3 -- 7 %% *** (3) Figure 7: 3 over 7 beginfig(7); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 3, 7, 21, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 8: 7 over 3 beginfig(8); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 7, 3, 21, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 3 -- 7 %% *** (3) Figure 9: 3 over 8 beginfig(9); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.5, 3, 8, 24, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 10: 8 over 3 beginfig(10); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.5, 8, 3, 24, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 3 -- 10 %% *** (3) Figure 11: 3 over 10 beginfig(11); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.25, 3, 10, 30, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 12: 10 over 3 beginfig(12); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.25, 10, 3, 30, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 3 -- 11 %% *** (3) Figure 13: 3 over 11 beginfig(13); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.125, 3, 11, 33, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 14: 11 over 3 beginfig(14); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.125, 11, 3, 33, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 3 -- 13 %% *** (3) Figure 15: 3 over 13 beginfig(15); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1, 3, 13, 39, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 16: 13 over 3 beginfig(16); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1, 13, 3, 39, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 4 -- 5 %% *** (3) Figure 17: 4 over 5 beginfig(17); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 4, 5, 20, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 18: 5 over 4 beginfig(18); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 5, 4, 20, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 4 -- 6 %% *** (3) Figure 19: 4 over 6 beginfig(19); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 4, 6, 12, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 20: 6 over 4 beginfig(20); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 6, 4, 12, 0}; endfig with_projection parallel_x_y no_sort; %% ** (2) 4 -- 7 %% *** (3) Figure 21: 4 over 7 beginfig(21); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 4, 7, 28, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 22: 7 over 4 beginfig(22); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 7, 4, 28, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 23: 4 over 9 beginfig(23); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.5, 4, 9, 36, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 24: 9 over 4 beginfig(24); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.5, 9, 4, 36, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 25: 4 over 10 beginfig(25); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.25, 4, 10, 20, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 26: 10 over 4 beginfig(26); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.25, 10, 4, 20, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 27: 4 over 11 beginfig(27); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.2, 4, 11, 44, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 28: 11 over 4 beginfig(28); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.2, 11, 4, 44, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 29: 4 over 13 beginfig(29); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.05, 4, 13, 52, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 30: 13 over 4 beginfig(30); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.05, 13, 4, 52, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 31: 4 over 14 beginfig(31); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, .9, 4, 14, 28, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 32: 14 over 4 beginfig(32); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, .9, 14, 4, 28, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 33: 5 over 6 beginfig(33); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 5, 6, 30, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 34: 6 over 5 beginfig(34); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 2, 6, 5, 30, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 35: 5 over 7 beginfig(35); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 5, 7, 35, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 36: 7 over 5 beginfig(36); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.75, 7, 5, 35, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 37: 5 over 8 beginfig(37); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.6, 5, 8, 40, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 38: 8 over 5 beginfig(38); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.6, 8, 5, 40, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 39: 5 over 9 beginfig(39); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.5, 5, 9, 45, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 40: 9 over 5 beginfig(40); %% width, height, cell_width, upper, lower, lcm, uppera polyrhythm {0, 1, 1.5, 9, 5, 45, 0}; endfig with_projection parallel_x_y no_sort; %% *** (3) Figure 41: 5 over 11 %% *** (3) Figure 42: 11 over 5 wd := 20; cell_wd := 0; upper := 5; lower := 11; lcm := 55; fig_ctr := 41; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, upper, lower, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, lower, upper, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; %% *** (3) Figure 43: 5 over 12 %% *** (3) Figure 44: 12 over 5 wd := 20; cell_wd := 0; upper := 5; lower := 12; lcm := 60; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, upper, lower, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, lower, upper, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; %% *** (3) Figure 45: 5 over 13 %% *** (3) Figure 46: 13 over 5 wd := 20; cell_wd := 0; upper := 5; lower := 13; lcm := 65; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, upper, lower, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, lower, upper, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; %% *** (3) Figure 47: 5 over 14 %% *** (3) Figure 48: 14 over 5 wd := 22; cell_wd := 0; upper := 5; lower := 14; lcm := 70; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, upper, lower, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, lower, upper, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; %% *** (3) Figure 49: 5 over 16 %% *** (3) Figure 48: 16 over 5 wd := 24; cell_wd := 0; upper := 5; lower := 16; lcm := 80; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, upper, lower, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, lower, upper, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; %% *** (3) Figure 51: 5 over 17 %% *** (3) Figure 52: 17 over 5 wd := 25; cell_wd := 0; upper := 5; lower := 17; lcm := 85; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, upper, lower, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, lower, upper, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; %% *** (3) Figure 53: 6 over 7 %% *** (3) Figure 54: 7 over 6 wd := 12; cell_wd := 0; upper := 6; lower := 7; lcm := 42; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, upper, lower, lcm, 0}; endfig with_projection parallel_x_y no_sort; fig_ctr += 1; beginfig(fig_ctr); polyrhythm {wd, 1, cell_wd, lower, upper, lcm, 0}; endfig with_projection parallel_x_y no_sort; fi; %% Done down to here. Replacing code above with calls to macro 'A'. LDF 2012.05.24. if true: % Done (up to 'fi') %% *** (3) Figure 55: 6 over 8 %% *** (3) Figure 56: 8 over 6 A {55, 12, 0, 6, 8, 24}; %% *** (3) Figure 57: 6 over 9 %% *** (3) Figure 58: 9 over 6 A {57, 12, 0, 6, 9, 18}; %% *** (3) Figure 59: 6 over 10 %% *** (3) Figure 60: 10 over 6 A {59, 12, 0, 6, 10, 30}; %% *** (3) Figure 61: 6 over 11 %% *** (3) Figure 62: 11 over 6 A {61, 25, 0, 6, 11, 66}; %% *** (3) Figure 63: 6 over 13 %% *** (3) Figure 64: 13 over 6 A {63, 25, 0, 6, 13, 78}; %% *** (3) Figure 65: 6 over 14 %% *** (3) Figure 66: 14 over 6 A {65, 25, 0, 6, 14, 42}; %% *** (3) Figure 67: 6 over 15 %% *** (3) Figure 68: 15 over 6 A {67, 25, 0, 6, 15, 30}; fi; %% Done down to here %% *** (3) Figure 69: 6 over 16 %% *** (3) Figure 70: 16 over 6 A {69, 25, 0, 6, 16, 48}; %% *** (3) Figure 71: 6 over 17 %% *** (3) Figure 72: 17 over 6 A {71, 28, 0, 6, 17, 102}; %% ** (2) 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: