12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 9-Hl-RES COLOR 93One s<strong>et</strong> of seven dots may be displayed by s<strong>et</strong>ting the color bit to displaygroup 1, and the other seven are displayed by s<strong>et</strong>ting the color bit to group2. For example, change the group two v<strong>al</strong>ue in location $24(/)(/), which ispresently 1(/)(/)(/) (/)(/)(/)1, to the equ iv<strong>al</strong>ent group one v<strong>al</strong>ue, (/)(/)(/)(/) (/)(/)(/)1, andthen back again by typing:2400 : 012400 : 81You will see the dot in line two move slightly to the left, and then back tothe right even though in both cases it was the left-most dot of the groupbeing displayed.The point is that there are actu<strong>al</strong>ly 56(/) dots across the Hi-Res screen,though only h<strong>al</strong>f the dots in any byte are available at any one time. Thefact that the group 2 dots are slightly to the right of the group 1 dots maybe exploited to draw a smoother line than possible with just one colorgroup, as we did in the example, or to smooth the outli nes of figures onthe screen in order to improve their looks.How1s That Again ?The result of <strong>al</strong>l this discussion is that there are 56(/) dots across the Hi-Resscreen, 28(/) of which are potenti<strong>al</strong>ly displayable. There are 14(/) pairs ofdots available when generating color, and <strong>al</strong>l the data for a line on thescreen must fit into 4(/) bytes. You use the units and model which are mostconvenient for your immed iate purpose.Hither, Dither, and YonAccord ing to the Apple documentation, there are only six colors availablein Hi-Res mode, including black and white. Since Apple built the <strong>computer</strong>one would expect them to be correct, and they are-sort of. Thereare programs available in Hi-Res which use many more than six colors,and that seems to contradict the reference manu<strong>al</strong>s.As you have seen for yourself, the dots on the Hi-Res screen are trulycapable of producing only black, white, viol<strong>et</strong>, blue, green, and orange;but when you add to that a good measure of programmer imagination andcreativity, it is possible to artifici<strong>al</strong>ly produce extra hues by a process c<strong>al</strong>led"dithering."Run the following program.10 REM DITHER DEMO20 REM30 DLAY = 200 : REM DELAY VALUE40 SZ = 50: REM SIZE

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!