The Big Bang - Epson FX-80 User Manual

Hide thumbs Also See for FX-80:
Table of Contents

Advertisement

This adjustment makes it easier to compare the distance value with the
value of the RND function (line 40 below).
Once the computer knows the distance of each cell from the upper
left comer, it can use the following test to determine which cells re-
ceive ones and which cells remain zero.
4~
IF
D>RND(~)
THEN A(R,C)
=
1
Line 40 compares the modified distance (D) of each cell to a random
number between zero and one. If D is greater than the random num-
ber, a one goes in that cell.
Program note: If your computer does not automatically set all varia-
bles to zero, add: 35 A(R,C)=O. Use your computer's
version of RND(O), line 40 (some computers use
RND(X) or RND).
The use of a random number in line 40 adds a measure of uncer-
tainty to the placement of the dots. Cells close to the upper left comer
of the square array have a high probability of containing a zero, those
far away have a high probability of containing a one. This use of
randomness means that each program run will yield a different pat-
tern.
The big bang
Are you ready to see what the program does? Change:
6~
PRINT "COUNTDOWN TO BIG BANG. T MINUS ";
N-R: NEXT R
Okay, now RUN the program (this time you can fly to Columbia for
coffee while you're waiting ... but it's worth it!)
179

Advertisement

Table of Contents
loading

Table of Contents