Debian Codegraph @

texmf-dist/doc/fonts/bartel-chess-fonts/other-sources/pkfootbows.mf

raw
1 % This is
2 % pkfootbows.mf
3 %
4 % Copyright (C) 1989-92 by Elmar Bartel.
5 %
6 % This program is free software; you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation; either version 1, or (at your option)
9 % any later version.
10 %
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
15 %
16 % You should have received a copy of the GNU General Public License
17 % along with this program; if not, write to the Free Software
18 % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 %
20 def DefineFootBows(
21 % This macro depends on the values of qs and BottomSpace
22 % and uses the makro ParallelPath.
23 expr BottomDist, %This is the space to BottomSpace
24 BowOneWidth, %This is the width of the main bow
25 FootHeight, %Distance from bottom of Bow0 to top of Bow3
26 BowTwoLoc, %Relative location of Bow2 between Bow3 and
27 % Bow1. 0 means position at position at Bow1,
28 % 1.0 means position at Bow3.
29 WidthToHeight, %Ratio of BowOneWidth/2 to Bowheight
30 BowTwoLen, %Length of Bow2 relative to Bow1
31 BowThreeLen %Lenght of Bow3 relative to Bow1
32 ) =
33
34 % All parameters are in pixels when not otherwise statet.
35 % Points are numbered from 0 to 3 from lower to upper
36 % Points to the left have suffix l, right suffix r
37 % points without further suffix are in the center of the bows
38
39 path Bow[];
40 numeric BowHeight;
41 numeric l[],x[]l,x[]r,x[],y[]l,y[]r,y[];
42
43 BowHeight = BowOneWidth*WidthToHeight/2;
44
45 % We start with the first bow
46 x1r + x1l = qs; x1r - x1l = BowOneWidth;
47 y1 = BottomSpace + 2*BowHeight + BottomDist;
48 x1 = .5qs;
49 y1l = y1r = y1 - BowHeight;
50 Bow1 = z1l .. {right} z1 .. z1r;
51
52 z0 = z1 shifted (down*2*BowHeight);
53 Bow0 = z1r .. {left} z0 .. z1l;
54
55 Bow3= ParallelPath(Bow1,FootHeight-2*BowHeight);
56 l3 = length(Bow3);
57 cu:= (1-BowThreeLen)/2;
58 Bow3:= subpath (cu*l3,(1-cu)*l3) of Bow3;
59 z3l = point 0 of Bow3;
60 z3 = point .5*length(Bow3) of Bow3;
61 z3r = point infinity of Bow3;
62
63 if proofing >0:
64 show point 0 of reverse Bow3;
65 show z3r;
66 fi;
67
68 Bow2= ParallelPath(Bow1,(FootHeight-2*BowHeight)*BowTwoLoc);
69 l2 = length(Bow2);
70 cu:= (1-BowTwoLen)/2;
71 Bow2:= subpath (cu*l2,(1-cu)*l2) of Bow2;
72 z2l = point 0 of Bow2;
73 z2 = point .5length(Bow3) of Bow2;
74 z2r = point infinity of Bow2;
75 labels(1l,1,1r,2l,2r,3l,3r);
76 enddef;
77
78 %DefineFootBows( .55qs, % BowOneWidth
79 % .25qs, % FootHeight
80 % .40, % BowTwoLoc
81 % .13, % WidthToHeight
82 % .90, % BowTwoLen
83 % .95); % BowThreeLen