12 def draw_slur(expr a,b,d) =
13 beginchar(0,0,0,0) "Embedded mf";
17 save alpha; alpha=angle(z3-z1);
18 z2=(1/2[x1,x3],1/2[y1,y3])+d*bow*(x3-x1)*dir(alpha+90);
19 save beta; beta=d*sign(y3-y1)*1.5angle(z2-z1)-alpha;
20 % message "d: "&decimal d;
21 % message "dy: "& decimal sign(y3-y1);
22 % message "alpha: "&decimal alpha;
23 % message "beta: "&decimal beta;
24 penpos1(thin,alpha+beta+90);
25 penpos2(thick,alpha+90);
26 penpos3(thin,alpha-beta+90);
28 fill z1l{dir(alpha+beta)}..z2l{dir(alpha)}..z3l{dir(alpha-beta)}
29 ..z3r{dir(180+alpha-beta)}..z2r{dir(180+alpha)}..z1r{dir(180+alpha+beta)}