File: prbla_05.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 (106 lines) | stat: -rw-r--r-- 3,102 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
%%%% prbla_05.ldf
%%%% Created by Laurence D. Finston (LDF) Thu Nov 17 22:28:24 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 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 <email-address>'' 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_05.ldf
%% mpost prbla_05
%% tex prbla_05.txt
%% dvips -o prbla_05.ps prbla_05.dvi 
%% gv prbla_05.ps &

%% *** (3) The intersection of a `parabola' and a linear `path'.
%%         So far, I've only programmed the coplanar case.
%%         LDF 2005.11.17.

verbatim_metapost "verbatimtex \magnification=\magstep5 \font\large=cmr12 etex";

focus f;
set f with_position (0, 10, -20) with_direction (0, 10, 100) with_distance 15; 

pickup pencircle scaled (1mm, 1mm);

beginfig(1);
parabola p;
set p with_parameter 3 with_extent 7;

path q;
q := ((-5, 0, -5) -- (7, 0, 12)) shifted (5, 0, -2);

draw p with_color blue;
draw q;

pickup pencircle scaled (2mm, 2mm);

drawdot get_vertex p;
drawdot get_focus p;

label.lft("$v$", get_vertex p); 
label.rt("$f$", get_focus p); 

point_vector pv;
pv := p intersection_points q;

if size pv > 0:
   drawdot pv0 with_color red;
   label.lrt("$i_0$", pv0);
fi;

if size pv > 1:
   drawdot pv1 with_color red;
   label.lft("$i_1$", pv1 shifted -.333);
fi;

endfig with_projection parallel_x_z;

verbatim_metapost "end";

end;