% greenpoint.mf - "The Green Point" in METAFONT % Copyright (C) 2001 Markus Triska % % This program 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 2 of the License, or % (at your option) any later version. % % This program 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 this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA % % Contact me at triska@gmx.at % % Version 0.9.1, August 27th, 2001 mode_setup; % The breadth of the tip of the arrow on both sides of the stem side_breadth#:=.9pt#; % The distance from the uppermost point of the stem to the boarder boarder_dist#:=1.3pt#; % The length of the tip of the arrow tip_length#:=2.1pt#; % The significance of the curvature of the tip of the arrow curve_factor:=2.3; define_whole_vertical_pixels(boarder_dist, side_breadth); define_whole_pixels(tip_length); beginchar("G", 8pt#, 8pt#, 0); "The Green Point, version 0.9.1"; pickup pencircle scaled .2pt; % The surrounding circle top z1' = (.5w, h); rt z2' = (w, .5h); bot z3' = (.5w, 0); lft z4' = (0, .5h); draw z1'{right}..{down}z2'..{left}z3'..{up}z4'..cycle; % The stem of the arrow path arc; arc = (.5w, 0){left}..tension 1.1..{right}(.5w, h - boarder_dist); fill arc--cycle; z1 = (.5w, h - boarder_dist + side_breadth); y2 = .5[y1, y3]; x2 = .5w + tip_length; x3 = .5w; y3 = .5w - .5side_breadth; % The tip of the arrow path tip; tip = z1{(curve_factor*(x2 - x1), y2 - y1)}..{(x2 - x1, curve_factor*(y2 - y1))}z2; tip := tip & z2{(x3 - x2, curve_factor*(y3 - y2))}..{(curve_factor*(x3 - x2), y3 - y2)} z3 -- cycle; fill tip; labels(1, 2, 3); tip := tip rotatedaround ((.5w, .5h), 180); unfill tip; arc := arc rotatedaround((.5w, .5h), 180); fill arc--(.5w, 0){right}..{up}(w, .5h)..{left}(.5w, h)..cycle; % Uncomment this to rotate the whole picture by 180 degrees % currentpicture := currentpicture rotatedaround ((.5w, .5h), 180); endchar; end.