I’ve used: \startMPpage[instance=doublefun] % Inspired by and largely copied from Donald Knuth's METAFONT dangerous bend glyph h=11; u=h/15; w=h*8.5/4.6; heavyline=2; y1=25/27h; x4=0; x1+x1=x1a+x1b=x4b+x2a=x4+x2=x4a+x2b=x3b+x3a=x3+x3=w; x4a=x4b=x4+u; x3b=x1a=x1-2u; y4+y4=y4a+y4b=y3b+y1a=y3+y1=y3a+y1b=y2b+y2a=y2+y2=0; y1a=y1b=y1-2/27h; y4b=y2a=y4+4/27h; path signboard; signboard := z1a..z1..z1b---z2a..z2..z2b--- z3a..z3..z3b---z4a..z4..z4b---cycle; % signboard fill signboard withcolor yellow; x10=x11=x12=x13=(.5w-u); x14=x15=x16=x17=w-x10; y10=y14=28/27h+epsilon; y13=-h*(6.6/4.1); z11=(z10..z13) intersectionpoint (z1a{z1a-z4b}..z1{right}); y15=y11; y16=y12=-y11; y17=y20=y21=y13; path toppost; toppost := z1 -- z11 -- z10 -- z14 -- z15 -- cycle; path bottompost; bottompost := z3 -- z16 -- z17 -- z13 -- z12 -- cycle; fill toppost withcolor .5white; fill bottompost withcolor .5white; draw signboard; draw z11--z10--z14--z15; draw z12--z13; draw z16--z17; % signpost x20=w-x21; x21-x20=16u; draw z20--z21; % ground level x38=w-x31; x38-x31=8u; x32=x34=x38; x31=x35=x37; y31=-y38=12/27h; y32=-y37=9/27h; y34=-y35=3/27h; pickup pencircle scaled heavyline; draw z32{z32-z31}..z34---z35..z37{z38-z37}; % the dangerous bend pickup penrazor xscaled heavyline rotated (angle(z32-z31)+90); draw z31--z32; draw z37--z38; % upper and lower bars \stopMPpage which results in:
On 27 May 2020, at 21:50, Herbert Voss
wrote: Am 27.05.20 um 21:19 schrieb Gerben Wierda:
To honour Donald Knuth, I’ve use his ‘dangerous bend’ (with attribution of course) in one of my publications. But I only had a low res image. Is the code of this symbol available somewhere so I can do it proper justice in a next edition? Knuth used
\input manmac \dbend \bye
Herbert
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________