+
+%
+% Make a superellipsoid segment going from FROM to TO, with SUPERNESS.
+% Take superness = sqrt(2)/2 to get a circle segment.
+%
+% See Knuth, p. 267 and p.126.
+
+def super_curvelet (expr from, to, superness, dir) =
+ if dir = 1:
+ (superness [xpart to, xpart from],
+ superness [ypart from, ypart to]){to - from}
+ else:
+ (superness [xpart from, xpart to],
+ superness [ypart to, ypart from]){to - from}
+ fi
+enddef;
+
+
+%
+% Bulb with smooth inside curve.
+%
+% alpha = start direction
+% beta = which side to turn to
+% flare = diameter of the bulb
+% line = diameter of line attachment
+% direction = is ink on left or right side (1 or -1)
+%
+% Note that `currentpen' must be set correctly -- only circular pens
+% are supported properly.
+
+def flare_path (expr pos, alpha, beta, line, flare, direction) =
+begingroup;
+ save thick;
+
+ thick = pen_top + pen_bot;
+