[pdp7-unix] GRAPHICS-2

Lars Brinkhoff lars at nocrew.org
Wed Oct 23 15:36:09 AEST 2019


Several people asked why e.g. capital A looks wrong.  I believe it's
because of how cas renders the shape.  A longer explanation follows.

The input data for A is:

   :ca
   v
   af
   ml
   x
   hd
   v
   hi
   x
   mn
   r

This means: (starting at "ma") turn beam on, draw to "af", draw to "nl",
turn beam off.  Move to "hd", turn beam on, move to hi.  End then move
to next character.

Rendered on a grid this looks like:

   a b c d e f g h i j k l
   . . . . . 1 . . . . . . a
   . . . . . . . . . . . . b
   . . . . . . . . . . . . c
   . . . . . . . . . . . . d
   . . . . . . . . . . . . e
   . . . . . . . . . . . . f
   . . . . . . . . . . . . g
   . . . 3 . . . . 4 . . . h
   . . . . . . . . . . . . i
   . . . . . . . . . . . . j
   . . . . . . . . . . . . k
   . . . . . . . . . . . . l
   0 . . . . . . . . . . 2 m

0 is the starting point set by the previous character, and 1 through 4
are the strokes defined by the input.  The lines 0-1-2 and 3-4 seem to
draw a perfectly nicely shaped A.

However, the output from cas is this:

   11 11 11
   11 11 70
   50 13 13
   13 13 13
   13 74 54
   07 07 07
   07 07 07
   26 72 12
   03 03 03
   03 03

Let's just examine the very first line in detail.  "11" means draw one
point and move diagonally up and right.  This is done five times.  "70"
means draw a straight line up 4 pixels. "50" means draw three more
steps.  "13" etc is next line.  Rendered on a grid this looks like:

   a b c d e f g h i j k l
   . . . . . . . . . . . . a
   . . . . . * . . . . . . b
   . . . . . * . . . . . . c
   . . . . . * . . . . . . d
   . . . . . * . . . . . . e
   . . . . . * . . . . . . f
   . . . . . * . . . . . . g
   . . . . . * . . . . . . h
   . . . . * . . . . . . . i
   . . . * . . . . . . . . j
   . . * . . . . . . . . . k
   . * . . . . . . . . . . l
   * . . . . . . . . . . . m

This isn't a nice straight line from "ma" to "af".  Apparently cas'
algorithm for oblique lines is to first draw diagonally, then a straight
line.  Maybe our cas version is an early one and improvements were made
in later versions which were not preserved.


More information about the pdp7-unix mailing list