%% bldelem1.ldf %% Created by Laurence D. Finston (LDF) Tue May 29 13:07:43 CEST 2012 %% $Id: bldelem1.ldf,v 1.15 2012/06/23 23:40:49 lfinsto1 Exp $ %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. %%%% Copyright (C) 2012 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 29, 2012 %% Last updated: June 23, 2012 %% Run like this: %% 3dldf bldelem1.ldf %% mpost bldelem1.mp %% tex bldelem1.txt %% dvips -o bldelem1.ps bldelem1.dvi %% ps2pdf bldelem1.ps %% All on one line: if false: 3dldf bldelem1.ldf && mpost bldelem1.mp && tex bldelem1.txt && \ dvips -o bldelem1.ps bldelem1.dvi \ && ps2pdf bldelem1.ps fi; %% View the PostScript file using Ghostview like this: %% gv bldelem1.ps & %% or with GNU Ghostview like this: %% ggv bldelem1.ps & %% View the PDF file with Acrobat Reader like this: %% acroread bldelem1.pdf & %% * (1) Beginning of 3DLDF code. input "bldelem1.lmc"; %% * (1) Declarations picture v; focus f[]; set f0 with_position (-20, 30, -50) with_direction (-20, 30, 10) with_distance 40; boolean do_testing; numeric ZERO; ZERO := 0; %% Figure 0 must be generated. beginfig(0); drawdot origin; endfig with_projection parallel_x_y no_sort; boolean double_tabs; numeric h_offset; numeric tab_height; %% *** (3) beginfig(1); rect_prism (ZERO) {1, 3, 1, false, true, 3, 3, 5}; endfig with_projection parallel_x_y no_sort; beginfig(1001); rect_prism (v) {1, 3, 1, true, true, 3, 3, 5}; endfig with_projection parallel_x_y no_sort; beginfig(2001); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) beginfig(2); rect_prism (ZERO) {1, 4, 1, false, true, 3, 3, 5}; endfig with_projection parallel_x_y no_sort; beginfig(1002); rect_prism (v) {1, 4, 1, true, true, 3, 3, 5}; endfig with_projection parallel_x_y no_sort; beginfig(2002); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) beginfig(3); rect_prism (ZERO) {1, 5, 1, false, true, 3, 3, 7}; endfig with_projection parallel_x_y no_sort; beginfig(1003); rect_prism (v) {1, 5, 1, true, true, 3, 3, 7}; endfig with_projection parallel_x_y no_sort; beginfig(2003); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) beginfig(4); rect_prism (ZERO) {1, 6, 1, false, true, 1, 3, 7}; endfig with_projection parallel_x_y no_sort; beginfig(1004); rect_prism (v) {1, 6, 1, true, true, 1, 3, 7}; endfig with_projection parallel_x_y no_sort; beginfig(2004); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) beginfig(5); rect_prism (ZERO) {1, 7, 1, false, true, 3, 3, 9}; endfig with_projection parallel_x_y no_sort; beginfig(1005); rect_prism (v) {1, 7, 1, true, true, 3, 3, 9}; endfig with_projection parallel_x_y no_sort; beginfig(2005); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) beginfig(6); rect_prism (ZERO) {1, 8, 1, false, true, 3, 3, 9}; endfig with_projection parallel_x_y no_sort; beginfig(1006); rect_prism (v) {1, 8, 1, true, true, 3, 3, 9}; endfig with_projection parallel_x_y no_sort; beginfig(2006); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) beginfig(7); rect_prism (ZERO) {1, 9, 1, false, true, 3, 3, 11}; endfig with_projection parallel_x_y no_sort; beginfig(1007); rect_prism (v) {1, 9, 1, true, true, 3, 3, 11}; endfig with_projection parallel_x_y no_sort; beginfig(2007); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) beginfig(8); rect_prism (ZERO) {1, 10, 1, false, true, 3, 3, 11}; endfig with_projection parallel_x_y no_sort; beginfig(1008); rect_prism (v) {1, 10, 1, true, true, 3, 3, 11}; endfig with_projection parallel_x_y no_sort; beginfig(2008); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) %% ** (2) %% numeric h_val_end %% numeric v_val_end %% numeric v_val_side %% numeric bevel %% boolean do_double_tabs %% boolean do_labels %% numeric ccross_a %% numeric ccross_b %% numeric ccross_c %% numeric final_rotation %% ** (2) 1 x 1 end rectangles %% *** (3) 1 x 1 x 3, 45° beginfig(9); rect_prism_nr (ZERO) {1, 1, 3, 45, -45, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1009); rect_prism_nr (v) {1, 1, 3, 45, -45, true, false, 3, 3, 5, false, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2009); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 4, 45° beginfig(10); rect_prism_nr (ZERO) {1, 1, 4, 45, -45, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1010); rect_prism_nr (v) {1, 1, 4, 45, -45, true, false, 3, 3, 5, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2010); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 5, 45° beginfig(11); rect_prism_nr (ZERO) {1, 1, 5, 45, -45, false, false, 3, 3, 7, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1011); rect_prism_nr (v) {1, 1, 5, 45, -45, true, false, 3, 3, 7, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2011); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 6, 45° beginfig(12); rect_prism_nr (ZERO) {1, 1, 6, 45, -45, false, false, 3, 3, 9, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1012); rect_prism_nr (v) {1, 1, 6, 45, -45, true, false, 3, 3, 9, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2012); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 7, 45° beginfig(13); rect_prism_nr (ZERO) {1, 1, 7, 45, -45, false, false, 3, 3, 9, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1013); rect_prism_nr (v) {1, 1, 7, 45, -45, true, false, 3, 3, 9, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2013); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 8, 45° beginfig(14); rect_prism_nr (ZERO) {1, 1, 8, 45, -45, false, false, 3, 3, 9, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1014); rect_prism_nr (v) {1, 1, 8, 45, -45, true, false, 3, 3, 9, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2014); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 9, 45° beginfig(15); rect_prism_nr (ZERO) {1, 1, 9, 45, -45, false, false, 3, 3, 11, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1015); rect_prism_nr (v) {1, 1, 9, 45, -45, true, false, 3, 3, 11, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2015); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 10, 45° beginfig(16); rect_prism_nr (ZERO) {1, 1, 10, 45, -45, false, false, 3, 3, 11, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1016); rect_prism_nr (v) {1, 1, 10, 45, -45, true, false, 3, 3, 11, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2016); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% ** (2) 1.5 x 1.5 end rectangles %% *** (3) 1.5 x 1.5 x 3, 45° beginfig(17); rect_prism_nr (ZERO) {1.5, 1.5, 3, 45, -45, false, false, 3, 3, 3, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1017); rect_prism_nr (v) {1.5, 1.5, 3, 45, -45, true, false, 3, 3, 3, false, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2017); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1.5 x 1.5 x 4, 45° beginfig(18); rect_prism_nr (ZERO) {1.5, 1.5, 4, 45, -45, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1018); rect_prism_nr (v) {1.5, 1.5, 4, 45, -45, true, false, 3, 3, 5, false, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2018); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1.5 x 1.5 x 5, 45° beginfig(19); rect_prism_nr (ZERO) {1.5, 1.5, 5, 45, -45, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1019); rect_prism_nr (v) {1.5, 1.5, 5, 45, -45, true, false, 3, 3, 5, false, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2019); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1.5 x 1.5 x 6, 45° beginfig(20); rect_prism_nr (ZERO) {1.5, 1.5, 6, 45, -45, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1020); rect_prism_nr (v) {1.5, 1.5, 6, 45, -45, true, false, 3, 3, 5, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2020); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1.5 x 1.5 x 7, 45° beginfig(21); rect_prism_nr (ZERO) {1.5, 1.5, 7, 45, -45, false, false, 3, 3, 7, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1021); rect_prism_nr (v) {1.5, 1.5, 7, 45, -45, true, false, 3, 3, 7, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2021); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1.5 x 1.5 x 8, 45° beginfig(22); rect_prism_nr (ZERO) {1.5, 1.5, 8, 45, -45, false, false, 3, 3, 7, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; %endfig with_focus f0 no_sort; beginfig(1022); rect_prism_nr (v) {1.5, 1.5, 8, 45, -45, true, false, 3, 3, 7, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2022); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; % %% *** (3) 2 x 1.5 x 6, 45° %% These work, but I need to generate a lot of others first. %% LDF 2012.06.11. % beginfig(10); % rect_prism_nr (v) {2, 1.5, 6, 45, -45, false, false, 3, 3, 3, true, -90}; %% single tabs % endfig with_projection parallel_x_y no_sort; % %endfig with_focus f0 no_sort; % beginfig(1010); % rect_prism_nr (v) {2, 1.5, 6, 45, -45, true, false, 3, 3, 3, true, -90}; %% double tabs % endfig with_projection parallel_x_y no_sort; %% * (1) Parallelepipeds %% ** (2) 1 x 1 end rectangles %% *** (3) 1 x 1 x 3, 45° beginfig(200); rect_prism_nr (ZERO) {1, 1, 3, 45, 45, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1200); rect_prism_nr (v) {1, 1, 3, 45, 45, true, false, 3, 3, 5, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2200); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 4, 45° beginfig(201); rect_prism_nr (ZERO) {1, 1, 4, 45, 45, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1201); rect_prism_nr (v) {1, 1, 4, 45, 45, true, false, 3, 3, 5, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2201); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 5, 45° beginfig(202); rect_prism_nr (ZERO) {1, 1, 5, 45, 45, false, false, 3, 3, 7, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1202); rect_prism_nr (v) {1, 1, 5, 45, 45, true, false, 3, 3, 7, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2202); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 6, 45° beginfig(203); rect_prism_nr (ZERO) {1, 1, 6, 45, 45, false, false, 3, 3, 7, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1203); rect_prism_nr (v) {1, 1, 6, 45, 45, true, false, 3, 3, 7, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2203); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 7, 45° beginfig(204); rect_prism_nr (ZERO) {1, 1, 7, 45, 45, false, false, 3, 3, 9, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1204); rect_prism_nr (v) {1, 1, 7, 45, 45, true, false, 3, 3, 9, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2204); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 8, 45° beginfig(205); rect_prism_nr (ZERO) {1, 1, 8, 45, 45, false, false, 3, 3, 9, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1205); rect_prism_nr (v) {1, 1, 8, 45, 45, true, false, 3, 3, 9, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2205); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 9, 45° beginfig(206); rect_prism_nr (ZERO) {1, 1, 9, 45, 45, false, false, 3, 3, 11, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1206); rect_prism_nr (v) {1, 1, 9, 45, 45, true, false, 3, 3, 11, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2206); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 10, 45° beginfig(207); rect_prism_nr (ZERO) {1, 1, 10, 45, 45, false, false, 3, 3, 11, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1207); rect_prism_nr (v) {1, 1, 10, 45, 45, true, false, 3, 3, 11, true, -90}; %% double tabs %endfig with_focus f0 no_sort; endfig with_projection parallel_x_y no_sort; beginfig(2207); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 4, 45°/-20% beginfig(300); rect_prism_nr (ZERO) {1, 1, 4, 45, -20, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1300); rect_prism_nr (v) {1, 1, 4, 45, -20, true, false, 3, 3, 5, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2300); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) 1 x 1 x 4, 45°/20% beginfig(400); rect_prism_nr (ZERO) {1, 1, 4, 45, 20, false, false, 3, 3, 5, true, -90}; %% single tabs endfig with_projection parallel_x_y no_sort; beginfig(1400); rect_prism_nr (v) {1, 1, 4, 45, 20, true, false, 3, 3, 5, true, -90}; %% double tabs endfig with_projection parallel_x_y no_sort; beginfig(2400); current_picture := v; clear v; endfig with_projection parallel_x_y no_sort; %% *** (3) %% ** (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 "bldelem1.ldf") %% eval:(set-register ?, "bldelem1.lmc") %% eval:(set-register ?. "bldelem1.txt") %% End: