Chapter 8
Not too shabby for rank amateurs.
Here’s what happens:
Line 10 clears the screen.
Line 20 selects the “low memory” HIRES page. This part of memory is used for
48K disk users have two different chunks of memory that can be used for HIRES graphics. If we wanted, we could store 2 different pictures at the same time. Refer to the Apple Programming Reference Manual for more information.
Line 30 selects a color.
Lines 40 and 70 set up a loop for plotting a figure.
Line 50 calculates the radius as a function of the angle. We are using polar coordinates in case you hadn’t guessed. If you don’t really care, it doesn’t really matter - the picture is still pretty.
Line 60 converts from polar to rectangular coordinates and plots a single point. Whew! It’s a good thing computers don’t require a good math background.
Why All This Math?Using Math equations to create graphics is easier than by doing it the hard way,
Type:
TEXT
to return back to the TEXT page. Even though we can’t see it, the picture remains stored in the
We can play with line 50 to get different figures. Try:
50 R=3 * A | and |
72