%%%% hyprb_04.ldf
%%%% Created by Laurence D. Finston (LDF) Mon Nov 28 17:37:19 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 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
%% *** (3) The intersection points of a `hyperbola' `h' and a linear `path' `q',
%% such that `h' and `q' are non-coplanar.
%%
%% LDF 2005.11.28.
verbatim_metapost "verbatimtex \magnification=\magstep5 \font\large=cmr12 etex";
pickup pencircle scaled (.75mm, .75mm);
focus f;
set f with_position (-5, 10, -20) with_direction (-5, 10, 100) with_distance 15;
picture save_picture;
beginfig(1);
hyperbola h;
set h with_max_extent 10;
transform t;
t := identity shifted (0, 0, 3);
path q[];
point p[];
p0 := get_point 30 h;
p1 := p0 shifted (-2, -5, -1);
p2 := mediate(p1, p0, 2);
q0 := p1 -- p2;
q1 := q0 rotated (0, 100) shifted -2;
h *= q0 *= t;
draw h with_color blue;
draw q0;
draw q1;
bool_point_vector bpv;
bpv := h intersection_points q0;
if size bpv > 0:
p3 := bpv0;
fi;
clear bpv;
bpv := h intersection_points q1;
message "bpv:";
show bpv;
if size bpv > 0:
p4 := bpv0;
fi;
%% **** (4) Labels.
pickup pencircle scaled (1.5mm, 1.5mm);
drawdot p3 with_color red;
label.lrt("$i_0$, {\\tt true}", p3 shifted .25);
drawdot p4 with_color red;
label.lft("$i_1$, {\\tt false}", p4 shifted -.25);
label.rt("$q_0$", (get_point 1 q0) shifted (.225, -.75));
label.lft("$q_1$", (get_point 1 q1) shifted (-.225, -.75));
save_picture := current_picture;
endfig with_focus f no_sort;
verbatim_metapost "end";
end;
beginfig(2);
output save_picture with_projection parallel_x_y;
endfig;
beginfig(3);
output save_picture with_projection parallel_x_z;
endfig;
beginfig(4);
output save_picture with_projection parallel_z_y;
endfig;
verbatim_metapost "end";
end;