at a time. The variable A$ is used to build a string of all the columns of BIT% in a given row.

As you can see, by taking the program in small pieces and analyzing it, graphics programming does not have to be difficult. If you want to try some other plots, try these (replace lines after 600 with the lines below). The printouts from each program are shown below the listing.

600 ’

610'Subroutine to plot a star.

620'

630RAD = 9

640FOR ANG% = 0 TO 360 STEP 45

650RANG = ANG% * 3.14159 / 180

660RANG2 = (ANG% + 135) * 3.14159 / 180

670Xl = RAD * COS(RANG) + 10

680Yl = RAD * SIN(RANG) + 10

690X2 = RAD * COS(RANG2) + 10

700Y2 = RAD * SIN(RANG2) + 19

710GOSLJB270

720NEXT ANG%

730RETURN

600 ’

610'Subroutine to plot a sine wave.

620'

630Xl = 0 : Yl = 10 : X2 = 20 : Y2 = 10

640GOSUB 270

650 Xl = 10 : Yl = 0 : X2 = 10 : Y2 = 20

660GOSUB 270

670 irl= 0 : Yl = 10

680 FOR X2 = 0 TO 20 STEP .2

690 Y2 = 10 - 9 * SIN(3.14159 * X2 / 10) : GOSUB 270

700NEXT X2

710RETURN

.-

-

-

-

-

--

-

-

--

--

-

-

-

-

-

-

-

114

Page 124
Image 124
Star Micronics SR-10/I5 user manual Next ANG% Return