Exploding Galaxy - Epson FX Series User Manual

Fx series printer
Hide thumbs Also See for FX Series:
Table of Contents

Advertisement

100 IF Z=2 THEN B=l: E=N-6: S=l
110 FOR P=B TO E STEP 7*S
120 PRINT "LOADING ROWS";P;"TO"; P+6*S
130 LPRINT CHR$(27) "*"CHR$(5)CHR$(2*N)CHR$(0);
140 FOR C=N TO 1 STEP -1: GOSUB 180: NEXT C
150 FOR C=l TO N: GOSUB 180: NEXT C
160 LPRINT: NEXT P: NEXT Z
170 LPRINT CHR$(27)"@": END
180 F=0: FOR R=P TO P+6*S STEP S
190 IF A(R,C)=l THEN F=F+2^ABS(P+6*S-R)
200 NEXT R
220 LPRINT CHR$(F);: RETURN
Go ahead and RUN it to see how it works.
There are two important points here:
like a plotter,
the
ory, then prints it line by line; 2) the program takes advantage of
symmetry to print a figure four times the size of

Exploding galaxy

With a few more program changes, you can turn this mundane
circle into a design for an exploding galaxy. First change the size so
you can see the full impact of the figure (note that
that
of seven):
10 DEFINT A: N=l05: DIM A(N,N)
Yes, that
105
the circle did, but that's the price you pay for largeness.
If your computer system requires a WIDTH statement to prevent
the printer from issuing a carriage return before the graphics line is
complete, add it now:
7 WIDTH LPRINT 255
The format for this statement may be different for your BASIC; see
your software documentation.
Next modify the distance formula slightly. Type:
30 D=SQR(R^2+C^2)/N: D=D*D
184
program gathers the pattern in
means this will take even longer to print out than
instead of tracing the circle
1)
computer's mem-
the
original array.
the
105
is a multiple

Hide quick links:

Advertisement

Chapters

Table of Contents
loading

This manual is also suitable for:

Fx-100Fx-80Fx-185 - impact printer

Table of Contents