File: bldelem5.ldf

package info (click to toggle)
3dldf 2.0.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,424 kB
  • ctags: 6
  • sloc: makefile: 889; sh: 117; cpp: 5
file content (216 lines) | stat: -rw-r--r-- 5,199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
%% bldelem5.ldf
%% Created by Laurence D. Finston (LDF) Thu Jul  5 14:09:37 CEST 2012

%% * (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 <email-address>'' 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 5, 2012
%% Last updated:  September 15, 2012

%% Run like this:

%% 3dldf bldelem5.ldf 
%% mpost bldelem5.mp 
%% tex bldelem5.txt 
%% dvips -o bldelem5.ps bldelem5.dvi
%% ps2pdf bldelem5.ps

%% All on one line:
if false:
3dldf bldelem5.ldf && mpost bldelem5.mp && tex bldelem5.txt && \
dvips -o bldelem5.ps bldelem5.dvi \
&& ps2pdf bldelem5.ps
fi;

%% View the PostScript file using Ghostview like this:
%% gv bldelem5.ps &
%% or with GNU Ghostview like this:
%% ggv bldelem5.ps &

%% View the PDF file with Acrobat Reader like this:
%% acroread bldelem5.pdf &

%% * (1) Rectangular Right Prisms

%% * (1) Beginning of 3DLDF code.

input "bldelem5.lmc";

%% * (1) Declarations

focus f[];

set f0 with_position (-20, 30, -50) 
       with_direction (-20, 30, 10) with_distance 40; 


boolean do_testing;

picture A;
picture B;
picture C;
picture D;
picture E;
picture F;

%% 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) 1 x i x 1 (Width = 1, Height = 1, 1.5, 2 ... 10, Depth = 1)

% numeric h_val_side 
% numeric v_val_side 
% numeric height_end 
% boolean ddouble_tabs 
% boolean do_guidelines 
% numeric ccross_a 
% numeric ccross_b 
% numeric ccross_c

fig_ctr := 1;

numeric cross_val_b;

cross_val_b := 3;

for i = 1 step .25 until 10:

   if i == 2:
      cross_val_b := 5;
   fi;

   rect_prism (A, B, C, D, E, F) {1, i, 1, false, true, 3, cross_val_b, 3};

   message "fig_ctr:"; 
   show fig_ctr;

   beginfig(fig_ctr); 
      current_picture += A;
      current_picture += B;
      current_picture += C;
   endfig with_projection parallel_x_y no_sort;

   fig_ctr += 1;


   message "fig_ctr:"; 
   show fig_ctr;

   beginfig(fig_ctr); 
      current_picture += A;
      current_picture += B;
      current_picture += D;
   endfig with_projection parallel_x_y no_sort;

   fig_ctr += 1;

   message "fig_ctr:"; 
   show fig_ctr;

   beginfig(fig_ctr); 
      current_picture += E;
   endfig with_projection parallel_x_y no_sort;

   fig_ctr += 1;

   message "fig_ctr:"; 
   show fig_ctr;

   beginfig(fig_ctr); 
      current_picture += F;
   endfig with_projection parallel_x_y no_sort;

   fig_ctr += 1;

   clear A;
   clear B;
   clear C;
   clear D;
   clear E;
   clear F;

endfor;

message "fig_ctr:"; 
show fig_ctr;

%% ** (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 "bldelem5.ldf")
%% eval:(set-register ?, "bldelem5.lmc")
%% eval:(set-register ?. "bldelem5.txt")
%% End: