%%%% arc_1.ldf %%%% Created by Laurence D. Finston (LDF) Thu Mar 1 11:55:01 CET 2007 %% * (1) Copyright and License. %%%% This file is part of GNU 3DLDF, a package for three-dimensional drawing. %%%% Copyright (C) 2007, 2008, 2009, 2010, 2011 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 the maintainer of %%%% GNU 3DLDF to send 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 The Free Software Foundation, Inc. %%%% 51 Franklin St, Fifth Floor %%%% Boston, MA 02110-1301 %%%% USA %%%% Laurence.Finston@gmx.de %% Run the following commands: %% 3dldf arc_1.ldf %% mpost arc_1.mp %% tex arc_1.txt %% dvips -o arc_1.ps arc_1.dvi %% * (1) Beginning of 3DLDF code. %% **** (4) focus f; set f with_position (-3, 15, -30) with_direction (-3, 15, 100) with_distance 15; picture save_picture; pickup pencircle scaled (.6mm, .6mm); %% **** (4) pen_width := .75mm; w := 12cm; h := 16cm; frame_w := w - .5pen_width; frame_h := h - .5pen_width; path frame; frame := origin -- (frame_w, 0) -- (frame_w, frame_h) -- (0, frame_h) -- cycle; shift frame (-.5frame_w, -.5frame_h); rad := 5; circle circ; point M; point p[]; %% **** (4) beginfig(1); circ := unit_circle scaled (rad, 0, rad) rotated 90; M := get_center circ; dotlabel.bot("$M$", M); draw circ; p0 := (rad, 0) rotated (0, 0, 45); p1 := (-rad, 0) rotated (0, 0, -39); dotlabel.rt("$p_0$", p0); dotlabel.top("$p_1$", p1); draw p0 -- p1; p2 := mediate(p0, p1); dotlabel.llft("$p_2$", p2); bool_point_vector bpv; bpv := circ intersection_points (M -- p2); p3 := bpv[0]; dotlabel.top("$p_3$", p3); p4 := mediate(p0, p3); dotlabel("\space", p4); label.lft("$p_4$", p4 shifted (-.1, -.1)); bpv := circ intersection_points (M -- p4); p5 := bpv[1]; dotlabel.top("$p_5$", p5); draw p3 -- p0; draw M -- p5; draw M -- p3; a := magnitude (p3 - p2); b := magnitude (p0 - p2); c := magnitude (p0 - p3); point A; point B; point C; point D; A := mediate (p3, p2); B := mediate (p0, p2); C := mediate (p0, p3); D := mediate (p0, p3, .75); label.lft("$a$", A); label.lrt("$b$", B); label.urt("$c$", C shifted (3mm, -1mm)); label.urt("$d$", D shifted (0mm, -.5mm)); alpha := arcsind (a / c); beta := arcsind (b / c); % message "alpha:"; % show alpha; % message "beta:"; % show beta; label.lrt("$\beta$", p3 shifted (0, -1mm)); label.lft("$\alpha$", p0 shifted (-4mm, 1mm)); p6 := M shifted (.1, .5); p7 := p6 shifted (.5, 0); drawarrow p7 -- p6; label.rt("$\gamma = \alpha$", p7); point R; R := mediate(M, p3); label.lft("$r$", R); d := .5c; r := d / sind alpha; message "r:"; show r; p8 := p0 rotated (0, 0, 67.5); label.top("$q$", p8); message "alpha:"; show alpha; ang := (p0 - M) angle (p1 - M); show ang; draw frame; endfig with_projection parallel_x_y; verbatim_metapost "end;"; end; %% ** (2) End of 3DLDF code. %% * Local variables for Emacs. %% Local Variables: %% mode:Metafont %% eval:(outline-minor-mode t) %% eval:(read-abbrev-file abbrev-file-name) %% outline-regexp:"%% [*\f]+" %% End: