HP Forums
How to compile pixels? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: How to compile pixels? (/thread-14094.html)



How to compile pixels? - heavensabove - 12-03-2019 04:34 PM

In the house 49g+/48gii aur have such a program:GROB number,then plot it.I want to know how to get that string of hexadecimal digits.


RE: How to compile pixels? - Christoph Giesselink - 12-03-2019 08:45 PM

The graphic example:
Code:
 OOOOO
O     O
O   O O
O     OO
O     O
 OOOOO
   O
  OOO   O
 O O O O
O  O  O
O  O
  O O
 O   O
O     O O
 O     O

The graphic is coded line per line. The graphic has a width of 9 we habe to spend 2 bytes (a multiple of 8) per line.

Let's split the graphic into nibbles, bit 0 first. The headline shows the value of each bit.

Code:
1248|1248|1248|1248

 OOO|OO  |    |
O   |  O |    |
O   |O O |    |
O   |  OO|    |
O   |  O |    |
 OOO|OO  |    |
   O|    |    |
  OO|O   |O   |
 O O| O O|    |
O  O|  O |    |
O  O|    |    |
  O |O   |    |
 O  | O  |    |
O   |  O |O   |
 O  |   O|    |

So looking at first Line replacing the blank with 0 the 'O' with 1

Line1, Nibble 0 = 0111 -> reverse -> 1110 -> E
Line1, Nibble 1 = 1100 -> reverse -> 0011 -> 3
Line1, Nibble 2 = 0000 -> reverse -> 0000 -> 0
Line1, Nibble 3 = 0000 -> reverse -> 0000 -> 0

Line2, Nibble 0 = 1000 -> reverse -> 0001 -> 1
Line2, Nibble 1 = 0010 -> reverse -> 0100 -> 4
Line2, Nibble 2 = 0000 -> reverse -> 0000 -> 0
Line2, Nibble 3 = 0000 -> reverse -> 0000 -> 0

so doing the next lines until end.

GROB width height

E300
1400
1500
1C00
1400
E300
8000
C110
AA00
9400
9000
4100
2200
1410
2800

Written in the example:

GROB 9 15 E300
140015001C001400E300
8000C110AA0094009000
4100220014102800