Cistercian numerals

Revision as of 18:47, 7 November 2020 by Chunes (talk | contribs) (Add new draft task and Plain English entry)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Cistercian numerals were used across Europe by Cistercian monks during the Late Medieval Period as an alternative to Roman numerals. They were used to represent base 10 integers from 0 to 9999.

Cistercian numerals is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
How they work

All Cistercian numerals begin with a vertical line segment, which by itself represents the number 0. Then, glyphs representing the digits 1 through 9 are optionally added to the four quadrants of the vertical line. These glyphs are drawn with vertical and horizontal symmetry about the vertical line segment. Each quadrant corresponds to a digit place in the number:

  • The upper-right quadrant represents the ones place.
  • The upper-left quadrant represents the tens place.
  • The lower-right quadrant represents the hundreds place.
  • The lower-left quadrant represents the thousands place.

Please consult the following image for examples of Cistercian numerals showing each glyph: [1]

Task
  • Write a function/procedure/routine to display any given Cistercian numeral. This could be done by drawing to the display, creating an image, or even as text (as long as it is a reasonable facsimile).
  • Use the routine to show the following Cistercian numerals:
  • 0
  • 1
  • 20
  • 300
  • 4000
  • 5555
  • 6789
  • And a number of your choice!
Notes

Due to the inability to upload images to Rosetta Code as of this task's creation, showing output here on this page is not required. However, it is welcomed — especially for text output.

See also


Plain English

<lang plainenglish>To run: Start up. Show some example Cistercian numbers. Wait for the escape key. Shut down.

To show some example Cistercian numbers: Put the screen's left plus 1 inch into the context's spot's x. Clear the screen to the lightest gray color. Use the black color. Use the fat pen. Draw 0. Draw 1. Draw 20. Draw 300. Draw 4000. Draw 5555. Draw 6789. Draw 9394. Refresh the screen.

To draw a Cistercian number: Split the Cistercian number into some thousands and some hundreds and some tens and some ones. Stroke zero. Stroke the ones given yes. Stroke the tens given no. Turn around. Stroke the hundreds given no. Stroke the thousands given yes. Turn around. Label the Cistercian number. Move the context's spot right 1 inch.

To label a Cistercian number: Save the context. Move down the half stem plus the small stem. Imagine a box with the context's spot and the context's spot. Draw "" then the Cistercian number in the center of the box with the dark gray color. Restore the context.

Some tens are a number.

Some ones are a number.

To split a number into some thousands and some hundreds and some tens and some ones: Divide the number by 10 giving a quotient and a remainder. Put the remainder into the ones. Divide the quotient by 10 giving another quotient and another remainder. Put the other remainder into the tens. Divide the other quotient by 10 giving a third quotient and a third remainder. Put the third remainder into the hundreds. Divide the third quotient by 10 giving a fourth quotient and a fourth remainder. Put the fourth remainder into the thousands.

The small stem is a length equal to 1/6 inch.

The half stem is a length equal to 1/2 inch.

The tail is a length equal to 1/3 inch.

The slanted tail is a length equal to 6/13 inch.

To stroke a number given a flag: Save the context. If the number is 1, stroke one given the flag. If the number is 2, stroke two given the flag. If the number is 3, stroke three given the flag. If the number is 4, stroke four given the flag. If the number is 5, stroke five given the flag. If the number is 6, stroke six given the flag. If the number is 7, stroke seven given the flag. If the number is 8, stroke eight given the flag. If the number is 9, stroke nine given the flag. Restore the context.

To stroke zero: Save the context. Stroke the half stem. Turn around. Move the half stem. Stroke the half stem. Restore the context.

To stroke one given a flag: Move the half stem. If the flag is yes, turn right. If the flag is no, turn left. Stroke the tail.

To stroke two given a flag: Move the small stem. If the flag is yes, turn right. If the flag is no, turn left. Stroke the tail.

To stroke three given a flag: Move the half stem. If the flag is yes, turn right 3/8 of the way. If the flag is no, turn left 3/8 of the way. Stroke the slanted tail.

To stroke four given a flag: Move the small stem. If the flag is yes, turn right 1/8 of the way. If the flag is no, turn left 1/8 of the way. Stroke the slanted tail.

To stroke five given a flag: Stroke 1 given the flag. Stroke 4 given the flag.

To stroke six given a flag: Move the half stem. If the flag is yes, turn right; move the tail; turn right. If the flag is no, turn left; move the tail; turn left. Stroke the tail.

To stroke seven given a flag: Stroke 1 given the flag. Stroke 6 given the flag.

To stroke eight given a flag: Stroke 2 given the flag. Stroke 6 given the flag.

To stroke nine given a flag: Stroke 1 given the flag. Stroke 8 given the flag.</lang>

Output:

https://commons.wikimedia.org/wiki/File:Cistercian_numerals.png