BlockstreamResearch / codex32

A paper computer for Shamir's Secret Sharing over the Bech32 alphabet.
80 stars 23 forks source link

Underline 6 and 9 on both volvelle wheels #15

Closed apoelstra closed 3 years ago

apoelstra commented 3 years ago

Builds on #14 but is a separate PR because there's more room for bikeshedding (e.g. should we underline other characters? all the characters? try a different approach)

Fixes #12

roconnor-blockstream commented 3 years ago

After reviewing 12 sided dice on etsy, The common solutions here are underlining or followed by a period.

If we want to do a period we need some tighter kerning than offered natively by the Courier font.

To draw an underline, I recommend the simpler code of gsave (_) show grestore. To draw a dot, the following code seems to work okay, but feel free to modify it.

gsave ( ) stringwidth pop 2 div 0 rmoveto (.) show grestore

While I like the underline better in general, I worry that it may not show up on the bottom disc if people have ill-cut out or ill-fastened to discs. I think using a period is more robust.

apoelstra commented 3 years ago

Rebased and changed to your underline code. That's much simpler!

I will experiment with the period ... but my feeling, after cutting out an underlined disk imperfectly, is that the underline is okay. Generally if you mess up the wheel then either the top or bottom of characters is consistently cut off ... and if you cut off the bottom, this is like a synthetic underline, while if you cut off the top then the printed underline is visible.

If you're only a little bit off, I actually usually force the wheel a little bit until I can see the underline, just to be sure.

I'm also a little skeptical that a . is any less likely to be hidden by a poorly-cut wheel than an underline.

I may also just try both.

apoelstra commented 3 years ago

I tried a few variants (just on my screen, not printing and cutting) and I think I continue to prefer the underline.

Just the dot looks a little awkward, especially as it feels poorly-placed no matter where you put it along the body of the 6. I'm not sure that its purpose is obvious. And the dot + underline is too noisy.

roconnor-blockstream commented 3 years ago

One other issue with underline to be aware of is that there is a third option to distinguish 6 and 9, and that is to use an overline. :/

apoelstra commented 3 years ago

One thing that helps guide this is that with the new top wheel layout from #14, the numbers 2-9 appear in order, so it is clear from context which one is 6 and which one is 9 ... and therefore whether the line is an underline or an overline.

roconnor-blockstream commented 3 years ago

Okay, let's try the underline. Some comments I've read on dice says that the underline is more distinct, and I've never actually encountered anyone trying to use an overline.