%%%% ripple_1.ldf %%%% Created by Laurence D. Finston (LDF) Thu Aug 14 19:50:01 CEST 2008 %%%% $Id: ripple_1.ldf,v 1.2 2008/08/14 18:07:34 lfinsto1 Exp $ %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. %%%% Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 The Free Software Foundation, Inc. %%%% 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 %% Last updated: August 13, 2008 %% Run like this: %% 3dldf ripple_1.ldf %% mpost ripple_1.mp %% tex ripple_1.txt %% dvips -o ripple_1.ps ripple_1.dvi %% All on one line: if false: 3dldf ripple_1.ldf; mpost ripple_1.mp; tex ripple_1.txt; \ dvips -o ripple_1.ps ripple_1.dvi fi; %% View using Ghostview like this: %% gv ripple_1.ps & %% Generate animated GIF like this: %% conveps --start=0 --end=121 --output-format=jpeg --border=0 ripple_1 %% convert -delay 25 ripple_1_*.jpg ripple_1.gif %% %% Other formats can be used; it doesn't have to be JPEG. %% The animated GIF can be viewed using the `animate' program from ImageMagick: %% animate ripple_1.gif %% * (1) Beginning of 3DLDF code. %% ** (2) Ripple Pattern 1 circle c[][]; point p[]; path q[]; m := 14; n := 15; q0 := (-m, 0, -n) -- (-m, 0, n) -- (m, 0, n) -- (m, 0, -n) -- cycle; q1 := (0, 0, -n) -- (0, 0, n); q2 := (-m, 0, 0) -- (m, 0, 0); pickup pencircle scaled (1.0mm, 1.0mm); k := .3333; for i = 1 upto 60: set c[0][i] with_diameter k; c[1][i] := c[0][i] shifted (3, 0, 3); c[2][i] := c[0][i] shifted (-3, 0, 2); c[3][i] := c[0][i] shifted (-5, 0, -2); k += .3333; endfor; beginfig(0); draw q0; endfig with_projection parallel_x_z; k := 120; for i = 1 upto 60: beginfig(i); draw q0; for j = i step -5 until 1: draw c[0][j]; if j > 3: draw c[1][j - 3]; fi; if j > 6: draw c[2][j - 6]; fi; if j > 11: draw c[3][j - 11]; fi; endfor; endfig with_projection parallel_x_z; if k > 60: beginfig(k); draw q0; for j = i step -5 until 1: draw c[0][j]; if j > 3: draw c[1][j - 3]; fi; if j > 6: draw c[2][j - 6]; fi; if j > 11: draw c[3][j - 11]; fi; endfor; endfig with_projection parallel_x_z; fi; k := k - 1; beginfig(121); draw q0; endfig with_projection parallel_x_z; endfor; %% *** (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) (ignore '( %% )) (setq outline-regexp "%% [*\f]+")) %% * (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: