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.

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 surrounding the vertical line segment. These glyphs are drawn with vertical and horizontal symmetry about the initial 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
 Numberphile - The Forgotten Number System
 dcode.fr - Online Cistercian numeral converter


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.
 
The mirror flag is a flag.
 
To draw a Cistercian number:
Split the Cistercian number into some thousands and some hundreds and some tens and some ones.
Stroke zero.
Set the mirror flag.
Stroke the ones.
Clear the mirror flag.
Stroke the tens.
Turn around.
Stroke the hundreds.
Set the mirror flag.
Stroke the thousands.
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:
Save the context.
If the number is 1, stroke one.
If the number is 2, stroke two.
If the number is 3, stroke three.
If the number is 4, stroke four.
If the number is 5, stroke five.
If the number is 6, stroke six.
If the number is 7, stroke seven.
If the number is 8, stroke eight.
If the number is 9, stroke nine.
Restore the context.
 
To turn home:
If the mirror flag is set, turn right; exit.
Turn left.
 
To turn home some fraction of the way:
If the mirror flag is set, turn right the fraction; exit.
Turn left the fraction.
 
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:
Move the half stem.
Turn home.
Stroke the tail.
 
To stroke two:
Move the small stem.
Turn home.
Stroke the tail.
 
To stroke three:
Move the half stem.
Turn home 3/8 of the way.
Stroke the slanted tail.
 
To stroke four:
Move the small stem.
Turn home 1/8 of the way.
Stroke the slanted tail.
 
To stroke five:
Stroke 1.
Stroke 4.
 
To stroke six:
Move the half stem.
Turn home.
Move the tail.
Turn home.
Stroke the tail.
 
To stroke seven:
Stroke 1.
Stroke 6.
 
To stroke eight:
Stroke 2.
Stroke 6.
 
To stroke nine:
Stroke 1.
Stroke 8.