%%%% intrfr_3.ldf %%%% Created by Laurence D. Finston (LDF) Mon Aug 11 18:43:40 CEST 2008 %%%% $Id: intrfr_3.ldf,v 1.4 2008/08/11 17:10:30 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 11, 2008 %% Run like this: %% 3dldf intrfr_3.ldf %% mpost intrfr_3.mp %% tex intrfr_3.txt %% dvips -o intrfr_3.ps intrfr_3.dvi %% All on one line: if false: 3dldf intrfr_3.ldf; mpost intrfr_3.mp; tex intrfr_3.txt; \ dvips -o intrfr_3.ps intrfr_3.dvi fi; %% View using Ghostview like this: %% gv intrfr_3.ps & %% Generate animated GIF like this: %% conveps --end=71 --output-format=jpeg --start=0 --border=0 intrfr_3 %% convert -delay 25 intrfr_3_*.jpg intrfr_3.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 intrfr_3.gif %% * (1) Beginning of 3DLDF code. %% ** (2) Interference Patterns 2 %% LDF 2008.08.11. circle c[]; %point p[]; path q; pickup pencircle scaled (1.0mm, 1.0mm); m := 10; n := 10; q := (-m, -n) -- (m, -n) -- (m, n) -- (-m, n) -- cycle; k := 256; for i = 0 upto 71: beginfig(i); draw q; for j = .5 step 1 until 15.5: set c0 with_diameter j with_point_count k; c1 := c0; rotate c0(i * 5, 0, 0); shift c0 by (0, .5); rotate c1(-i * 5, 0, 0); shift c1 by (0, -.5); %p0 := get_point 192 c0; %p1 := get_point 192 c1; %message "p0:"; %show p0; %message "p1:"; %show p1; draw c0; draw c1; %drawdot p0 with_pen pencircle scaled (2mm, 2mm) with_color red; %drawdot p1 with_pen pencircle scaled (2mm, 2mm) with_color red; endfor; endfig with_projection parallel_x_y no_sort; 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: