summaryrefslogtreecommitdiff
path: root/info/examples/Einfuehrung2/15-02-20.mp
blob: 8c311a67dff1cbe74b717f56f5e3e7a0737da0ab (plain)
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
%% 
%%  Ein Beispiel der DANTE-Edition
%%  
%%  2. Auflage
%% 
%%  Beispiel 15-02-20 auf Seite 723.
%% 
%%  Copyright (C) 2016 Herbert Voss
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 
%% 
%% ==== 
% Show page(s) 1
%% 
defaultfont:="ptmr8r";
warningcheck:=0;
% --- start of displayed preamble in the book ---

% --- end of displayed preamble in the book ---
% %
beginfig(1)
vardef zeichneWinkelhalbierende(expr A,B,C,S) =
  save AA; pair AA; (AA-A)=whatever*((A-C)
     rotated 1/2(angle(B-A)-angle(C-A)));
  AA=whatever[B,C];
  draw A--AA dashed evenly; S=AA;
enddef;
u:=2cm; pair A,AA,B,BB,C,CC,M,SS;
A=(0,1u); B=(3u,0.5u); C=(u,2.5u);
draw A--B--C--cycle;
zeichneWinkelhalbierende(A,B,C,AA);
zeichneWinkelhalbierende(B,C,A,BB);
zeichneWinkelhalbierende(C,A,B,CC);
M=whatever[A,AA]; M=whatever[B,BB];
SS=whatever[A,B]=whatever[M,M+((B-A) rotated 90)];
draw fullcircle scaled 2 length(SS-M)
  shifted M withpen pencircle scaled 2bp;
endfig;
end;