- save x,y;
- penpos1(balldiam/2,-90);
- penpos2(balldiam/2,0);
- penpos3(balldiam/2,90);
- penpos4(balldiam/2,180);
- x4r=xpart a-w; y3r=ypart a+balldiam/4;
- x1l=x2l=x3l=x4l;
- y1l=y2l=y3l=y4l;
- penpos5(stem,250);
- x5=x4r+9/8balldiam; y5r=y1r;
- penpos6(stem,260);
- x6l=xpart a; y6l=ypart a;
- penstroke z1e..z2e..z3e..z4e..z1e..z5e{right}..z6e;
- penlabels(1,2,3,4,5,6);
+ save thick;
+
+ thick = pen_top + pen_bot;
+
+ clearxy;
+
+ penpos1' (line - thick, 180 + beta + alpha);
+ top z1'r = pos;
+
+ penpos2' (flare - thick, 180 + beta + alpha);
+ z2' = z3';
+
+ penpos3' (flare - thick, 0 + alpha);
+ rt x3'l = hround (x1'r
+ + (1/2 + 0.43) * flare * xpart dir (alpha + beta));
+ bot y2'l = vround (y1'r
+ + (1 + 0.43) * flare * ypart dir (alpha + beta));
+
+ rt x4' = x2'r - line * xpart dir (alpha);
+ y4' = y2'r - line * ypart dir (alpha);
+
+ penlabels (1', 2', 3', 4');
+
+ save t, p;
+ t = 0.833;
+ path p;
+
+ p := z1'r{dir (alpha)}
+ .. z3'r{dir (180 + alpha - beta)}
+ .. z2'l{dir (alpha + 180)}
+ .. z3'l{dir (180 + alpha + beta)}
+ ..tension t.. z4'{dir (180 + alpha + beta)}
+ .. z1'l{dir (alpha + 180)};
+
+ if direction <> 1:
+ p := reverse p;
+ fi;
+
+p
+endgroup
+enddef;
+
+
+def brush (expr a, w, b, v) =
+begingroup;
+ draw_brush (a, w, b, v);
+ penlabels (3, 4, 5, 6);