%%%% prbla_12.ldf %%%% Created by Laurence D. Finston (LDF) Mon Nov 21 21:56:33 CET 2005 %% * (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 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 these commands: %% 3dldf prbla_12.ldf %% mpost prbla_12 %% tex prbla_12.txt %% dvips -o prbla_12.ps prbla_12.dvi %% gv prbla_12.ps & %% ** (2) The intersection of a `parabola' and linear `paths' that do %% not lie in the same plane as the `parabola'. %% LDF 2005.11.21. picture axis_picture; %% **** (4) axis_picture. beginfig(0); pickup pencircle scaled (1mm, 1mm); axis_x_lft := 5; axis_x_rt := 15; axis_y_bot := 10; axis_y_top := 10; axis_z_front := 7; axis_z_back := 10; drawarrow origin -- (-axis_x_lft, 0); drawarrow origin -- (axis_x_rt, 0); label.bot("x", (axis_x_rt, 0, -.1)); drawarrow origin -- (0, -axis_y_bot); drawarrow origin -- (0, axis_y_top); label.lft("y", (0, axis_y_top)); drawarrow origin -- (0, 0, -axis_z_front); drawarrow origin -- (0, 0, axis_z_back); label.lft("z", (-.25, 0, axis_z_back)); axis_picture := current_picture; clear current_picture; endfig; verbatim_metapost "verbatimtex \magnification=\magstep5 \font\large=cmr12 etex"; focus f; set f with_position (-5, 10, -20) with_direction (-5, 10, 100) with_distance 15; pickup pencircle scaled (.75mm, .75mm); beginfig(1); parabola prb[]; point p[]; set prb0 with_parameter 3 with_extent 12; p0 := get_point 3 prb0; p1 := p0 shifted (3, 5, 3); p2 := mediate(p1, p0, 2); path q[]; q0 := p2 -- p1; q1 := q0 rotated (-15, 30) shifted (15, 0, -1); draw q0; draw q1; draw prb0 with_color red; output axis_picture with_focus f no_sort; output current_picture with_focus f no_sort; clear current_picture; %% **** (4) verbatim_metapost "pickup pencircle scaled .75mm"; bool_point_vector bpv; bpv := prb0 intersection_points q0; message "bpv:"; show bpv; if size bpv > 0: dotlabel.ulft("$i_0$", bpv0) with_dot_color blue; fi; clear bpv; %% This shouldn't be necessary! Fix it. LDF 2005.11.21. bpv := prb0 intersection_points q1; message "bpv:"; show bpv; if size bpv > 0: dotlabel.urt("$i_1$", bpv0) with_dot_color blue; fi; endfig with_focus f no_sort; verbatim_metapost "end"; end;