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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 10-SHAPING UP 103In the first byte, section A contains the PU code, section B the code forSR, and section C is s<strong>et</strong> to (/)(/) to be ignored. The next PU code is in sectionA of byte number 2, followed by the SL in section B, and (/)(/) in C, which isagain ignored. The SU is in section A of byte number 3, followed by PRand then (/)(/). Byte number four is fi lled with zeros and marks the end ofthe shape. Any shape is ended by the fi rst zero byte encountered; therefore,if you intend to put the skip-up code ((/)(/)(/)) in sections A and B,section C MUST NOT BE ZEROS!Following these rules, Figure 1 (/)-4 shows the entire shape encoded infour bytes. The shape may not be displayed until it is entered in a shap<strong>et</strong>able, but before we do that, l<strong>et</strong>'s digitize one more shape fo r practice.UFO TimeIf you did not believe in flying saucers before, you will soon, as you areabout to create one. Figure 1 (/)-SA contains the block diagram of thesaucer you will create and Figure 1(/)-SB contains its vector diagram.ABFigure 1 Cll-5. Saucer.It is necessary to plot each of the 23 dots shown in Figure 1 (/)-SA, butthe order in which they are traced is not important. However, changingthe pattern of the vectors will <strong>al</strong>so <strong>al</strong>ter the v<strong>al</strong>ues used in the shape, so forthe sake of consistency we suggest that you use the vectors shown inFigure 1 (/)-SB. Follow the vectors and write down a list of their functions asyou go. Your list will look like this:PR, PR, PR, SR, SD , PL, PL, PL, PL,PL, PL, PD, PR, SR, SR, PR, SR, SR,PD, PL, PL, PL, PL, PL, PL, PD, SR,SR, PR, PR, PRGo back and double check your list; accu racy is tedious but imperative!!The next step is to encode the instructions as bytes. We have done thisin Figure 1 (/)-6. To be on the safe side, the encoding is done in a series ofsm<strong>al</strong>l steps, each of which is easily checked. The extra care taken now will

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

Saved successfully!

Ooh no, something went wrong!