RFC 387 (rfc387) - Page 2 of 5


Some experiences in implementing Network Graphics Protocol Level 0



Alternative Format: Original Text Document



RFC 387      Experience Implementing Net Graphics Protocol   August 1972


           System A                            System B
    (Absolute Coordinates)              (Relative Coordinates)

  -1 -2 -3                 -16         0 -1 -2                 -15
 -2  2  2  ...          ...2         -2  2  2  ...             2
 +--+--+--+--+---------+--+--+       +--+--+--+--+---------+--+--+
 |  |  |  |  |         |  |  |       |  |  |  |  |         |  |  |
 +--+--+--+--+---------+--+--+       +--+--+--+--+---------+--+--+
 ^                                      ^


 .0111 ...............11 = +1/2-e    0.11 ..............11 = 1-e

 .00 .................01 = +e        0.100 .............00 = 1/2

 .00 .................0 = 0          0.00...............01 = e

 .111 ................11 = -e        0.00 ..............00 = 0

 .100 ................   = 1/2       1.11 ..............11 = -e

                                     1.10 ..............00 = -1/2

                                     1.00 ..............01 = -1+e = -(1-e)

                                     1.00 ..............00 = -1


               -16                               -15
 Where:    e = 2                     Where:  e = 2

                          -16                           -15
 Range:    -1/2 to +1/2 - 2          Range:  -1 to +1 - 2

    I submit that one could interpret the requirement for absolute
coordinate data to be in the range -1/2 to +1/2 - e as requiring that
two different number systems should be used.  Thinking along those
lines, System A has the advantage that you never get handed a number out
of range, which saves some checking worries.  It also has one whole bit
more of precision.

    I further submit that having two systems to contend with merely
clouds the issue and requires extra coding.  It makes more sense just to
stick with System B above.  Among the advantages in its use are:

    1.  The single system can handle both absolute and relative
        coordinates.




Kelley & Meir