TI-86 Basic


Dive Into Graphics


What you'll learn:

Section 1: Manipulating Pixels

To turn a pixel on, use PxOn(x,y): y being 0-126; x being 0-62. PxOff(x,y) does just the opposite. To switch a pixel's "color" try using PxChg(x,y). PxTest(x,y) returns a 1 if the pixel is on and a zero if it's off. Considering all this, let's invert the screen:

Yes, this is numbingly slow, but for TI-Basic it's actually REALLY FAST. Now, your graph screen is completely reversed monochrome. Let's have more fun by taking the top left quadrant of your graph screen and mirror it to the other 3 quadrants:

BTW: no more commented tables. If you need them, go play with a Casio! Yet another slow program, but one we can all enjoy for 140 bytes.

Section 2: Manipulating Points

These mimic PxOn(x,y), PxOff(x,y), and PxChg(x,y) in all ways except x is between xmin and xmax, and y is between ymin and ymax. ZStd changes the graph window settings to these:

These look nice, but warp any good designs... Let's draw Sierpinski's Triangle 4 times:

That's somewhat like your manual's example, but uses resources better, cleans after itself, and clearly draws a prettier picture. You can save this to a picture by changing the ending code. Other fractals can be drawn, but we must make the code for it... Onward, to coding glory!

Section 3: Lines and Circles