%%%% sundl_03.ldf %%%% Created by Laurence D. Finston (LDF) Wed Oct 10 23:48:11 CEST 2007 %% $Id: sundl_03.ldf,v 1.5 2007/10/11 11:49:29 lfinsto1 Exp $ %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. %%%% Copyright (C) 2003, 2004, 2005, 2006, 2007, 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 %% Run like this: %% 3dldf sundl_03.ldf %% mpost sundl_03.mp %% tex sundl_03.txt %% dvips -o sundl_03.ps sundl_03.dvi %% All on one line: if false: 3dldf sundl_03.ldf; mpost sundl_03.mp; tex sundl_03.txt; \ dvips -o sundl_03.ps sundl_03.dvi fi; %% View using Ghostview like this: %% gv sundl_03.ps & %% ** (2) %% *** (3) Sundials 3. %% The macro `draw_sundial' is now in the file %% `sundials.lmc', which this file includes. %% I will be using the extension `.lmc' for %% files containing macro definitions. GNU 3DLDF %% currently doesn't have a means of "fast-loading" macro %% definitions that have been compiled into an easy-to-process %% form, as do TeX, METAFONT, and MetaPost. Programming this %% feature is on my "TO DO" list, but it will be a very big job. %% LDF 2007.10.10. focus f[]; set f0 with_position (0, 5, -12) with_direction (0, 5, 10) with_distance 10; %% Jerusalem 31 deg. 47' 0'' N, 35 deg. 13' 0'' E %% 31.783333 deg. N, 35.216667 deg. E %% Athens, Greece: latitude: 37 deg. 58' N 23 deg. 43' E %% == 37.9667 %% Chicago: latitude: 41.8667 %% 41 deg. 52' 55'' N 87 deg. 37' 40'' W %% == %% Rome, Italy 41 deg. 54' N 12 deg. 30' E %% Not done. %% %% London, UK: 51 deg. 30' 28'' N 0 deg. 7' 41'' W %% == 51.5077 N %% Goettingen: latitude: 51 deg 32' N, longitude: 9 deg 56' E %% == 51.5333 %% St. Petersburg, Russia 59 deg. 56' N, 30 deg. 20' E %% %% Jerusalem %% (+ 37 (/ 58.0 60) (/ 0 3600) %% Athens, %% (+ 41 (/ 52.0 60) (/ 55 3600)) %% Chicago %% (+ 51 (/ 30.0 60.0) (/ 28 3600.0)) %% London %% (+ 51 (/ 32.0 60.0) (/ 0 3600.0)) %% Goettingen %% (+ 59 (/ 56.0 60.0) (/ 0 3600.0)) %% St. Petersburg % latitude := 31.7833; %% Jerusalem % latitude := 37.9667; %% Athens, % latitude := 41.8667; %% Chicago % latitude := 51.5077; %% London % latitude := 51.533; %% Goettingen % latitude := 59.9333; %% St. Petersburg input "sundl_03.lmc"; %% **** (4) %% These parameters aren't used yet. %% LDF 2007.10.10. angle_x := 30; angle_y := 15; angle_z := 10; boolean vertical; boolean horizontal; vertical := true; horizontal := false; %% **** (4) Call draw_sundial radius := 5; %% ***** (5) Jerusalem, Israel latitude := 31.7833; %% Jerusalem, Israel start_figure := 1; %% Figures 1--3 draw_sundial {start_figure, f0, latitude, radius, vertical, angle_x, angle_y, angle_z}; %% ***** (5) Athens, Greece latitude := 37.9667; %% Athens, Greece start_figure += 3; %% Figures 4--6 draw_sundial {start_figure, f0, latitude, radius, vertical, angle_x, angle_y, angle_z}; %% ***** (5) Chicago latitude := 41.8667; %% Chicago start_figure += 3; %% Figures 7--9 %radius := 5; draw_sundial {start_figure, f0, latitude, radius, vertical, angle_x, angle_y, angle_z}; %% ***** (5) latitude := 51.5077; %% London start_figure += 3; %% Figures 10--12 %radius := 5; draw_sundial {start_figure, f0, latitude, radius, vertical, angle_x, angle_y, angle_z}; %% ***** (5) Goettingen latitude := 51.533; %% Goettingen start_figure += 3; %% Figures 13--15 %radius := 5; draw_sundial {start_figure, f0, latitude, radius, vertical, angle_x, angle_y, angle_z}; %% ***** (5) St. Petersburg latitude := 59.9333; %% St. Petersburg start_figure += 3; %% Figures 16--18 %radius := 5; draw_sundial {start_figure, f0, latitude, radius, vertical, angle_x, angle_y, angle_z}; %% ***** (5) End of calls to draw_sundial % *** (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)) %% * (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: