ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda <gerben.wierda@rna.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Dangerous bend metafont/post code?
Date: Thu, 28 May 2020 17:23:51 +0200	[thread overview]
Message-ID: <C743F1EA-A350-467D-9605-F01FFDA8003A@rna.nl> (raw)
In-Reply-To: <3fde1a4c-23bc-9d91-abc0-9718687c6552@fu-berlin.de>


[-- Attachment #1.1: Type: text/plain, Size: 2403 bytes --]

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 <Herbert.Voss@fu-berlin.de> 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
> ___________________________________________________________________________________


[-- Attachment #1.2.1: Type: text/html, Size: 5276 bytes --]

[-- Attachment #1.2.2: dbend.pdf --]
[-- Type: application/pdf, Size: 2628 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 2043 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

      reply	other threads:[~2020-05-28 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 19:19 Gerben Wierda
2020-05-27 19:42 ` Lutz Haseloff
2020-05-27 19:43 ` Taco Hoekwater
2020-05-27 19:50 ` Herbert Voss
2020-05-28 15:23   ` Gerben Wierda [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C743F1EA-A350-467D-9605-F01FFDA8003A@rna.nl \
    --to=gerben.wierda@rna.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).