%% bldelem4.ldf %% Created by Laurence D. Finston (LDF) Wed Jun 20 13:15:08 CEST 2012 %% $Id: bldelem4.ldf,v 1.8 2022/12/16 14:05:00 lfinsto1 Exp $ %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. !%%%% Copyright (C) 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 %% Created: July 4, 2012 %% Last updated: July 4, 2012 %% Run like this: %% 3dldf bldelem4.ldf %% mpost bldelem4.mp %% tex bldelem4.txt %% dvips -o bldelem4.ps bldelem4.dvi %% ps2pdf bldelem4.ps %% All on one line: if false: 3dldf bldelem4.ldf && mpost bldelem4.mp && tex bldelem4.txt && \ dvips -o bldelem4.ps bldelem4.dvi \ && ps2pdf bldelem4.ps fi; %% View the PostScript file using Ghostview like this: %% gv bldelem4.ps & %% or with GNU Ghostview like this: %% ggv bldelem4.ps & %% View the PDF file with Acrobat Reader like this: %% acroread bldelem4.pdf & %% * (1) Pyramids %% * (1) Beginning of 3DLDF code. %input "bldelem4.lmc"; input "bldelem1.lmc"; input "bldelem3.lmc"; %% * (1) Declarations picture v; picture w; focus f[]; set f0 with_position (-20, 10, -50) with_direction (-20, 10, 10) with_distance 60; boolean do_testing; numeric diameter_two; numeric ZERO; ZERO := 0; %% Figure 0 must be generated. beginfig(0); drawdot origin; endfig with_projection parallel_x_y no_sort; picture u; picture v; picture w; picture text_picture; picture dbl_tab_picture; %% *** (3) Triangular bases %% sides %% base diameter %% height (non-truncated) %% height of lower section (truncated) %% height of upper section (obelisk) --- used when called by macro `obelisk', never %% when called directly %% crosshair counter A %% crosshair counter B %% do_guidelines (not used in macro as of 2012.07.04.) %% do_labels j := 1; for i = 1 upto 5: pyramid (u, v, w, text_picture, dbl_tab_picture, diameter_two, ZERO, ZERO) {3, 1, j, 0, 0, 5, 0, true, false}; beginfig(i); current_picture := u; endfig with_focus f0 no_sort; beginfig(1000 + i); current_picture += v; endfig with_projection parallel_x_y no_sort; beginfig(2000 + i); current_picture += w; endfig with_projection parallel_x_y no_sort; beginfig(3000 + i); current_picture += text_picture; endfig with_projection parallel_x_y no_sort; beginfig(4000 + i); current_picture += dbl_tab_picture; endfig with_projection parallel_x_y no_sort; %endfig with_projection parallel_x_z no_sort; clear u; clear v; clear w; clear text_picture; clear dbl_tab_picture; j += .5; endfor; j := 1; for i = 6 upto 14: pyramid (u, v, w, text_picture, dbl_tab_picture, diameter_two, ZERO, ZERO) {3, 1.5, j, 0, 0, 5, 0, true, false}; beginfig(i); current_picture := u; endfig with_focus f0 no_sort; beginfig(1000 + i); current_picture += v; endfig with_projection parallel_x_y no_sort; beginfig(2000 + i); current_picture += w; endfig with_projection parallel_x_y no_sort; beginfig(3000 + i); current_picture += text_picture; endfig with_projection parallel_x_y no_sort; beginfig(4000 + i); current_picture += dbl_tab_picture; endfig with_projection parallel_x_y no_sort; %endfig with_projection parallel_x_z no_sort; clear u; clear v; clear w; clear text_picture; clear dbl_tab_picture; j += .5; endfor; %% ** (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]+" %% eval:(set-register ?c "bldelem4.ldf") %% eval:(set-register ?, "bldelem4.lmc") %% eval:(set-register ?. "bldelem4.txt") %% End: