From ukma!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!yale!eagle!dkonerding Sun Aug 13 20:16:49 EDT 1989
Article 509 of comp.binaries.apple2:
Path: ukma!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!yale!eagle!dkonerding
>From: dkonerding@eagle.wesleyan.edu
Newsgroups: comp.binaries.apple2
Subject: chaos!
Message-ID: <445@eagle.wesleyan.edu>
Date: 9 Aug 89 17:45:51 GMT
Lines: 80
I've decided to upload my two CHAOS programs-- both short and simple--
to COMP.APPLE2.BINARIES. Sorry for not putting them into BinSCII and
ShrinkIt-- first, I don't think it'd make life all that much easier, and
second, BinSCII doesn't work well on my machine.
CHAOS, the first program, is normal chaos, and a bit slow... it's
easily convertable, and easy to change the rules... if you can give it GS
graphics-- then it'd look fantastic, I'm sure. The second program adds
several
more points to the game-- increasing the strange attractor's area.
I'd like to see anything (usable or not) having to do with fractal,
mandelbrot, and chaotic/nonlinear math and graphics. If you have, please send
to DKONERDING@EAGLE.WESLEYAN.EDU or DKONERDING@WESLEYAN.BITNET. Thanks.
Oh yeah. I forgot-- if you'd like the rules, I think I can explain
them as according to CHAOS
1. Place three points on a grid. I've placed them at top middle, bottom left
and right. Name the first point "1,2", the second "3,4", and the third "5,6".
2. Roll the die. If you get 1 or 2, start at the first point, the one named
"1,2". For 3 or 4, start and the second-- etc. I've named this "current
point".
3. Roll the die again, and draw a dot exactly between the "current point" and
the new point- point "1,2" if you roll a 1 or a 2, etc. Make this point the
new "current pint".
4. Go to 2.
It still amazes me what a short program (it can be packed into a
two-liner) this is. It also amazes me that it works- after seeing this run on
supercompuuters, having my "dinky" Apple //e prove the existence of strange
attractors is quite fun.
You can do what you like to these programs- transmit them, delete
them,
change them, anything, so long as the credit line stays.
Enjoy!
1 REM this program plays chaos, with points at top middle, bottom left and
right
2 REM easy to convert to other machines
3 REM please do remove this line... CHAOS, by DAVID KONERDING--
DKONERDING@EAGLE.WESLEYAN.EDU
10 HOME : HGR : POKE - 16302,0: HCOLOR= 3
20 A(1) = 279 / 2:B(1) = 0
21 A(2) = 0:B(2) = 191
22 A(3) = 279:B(3) = 191
30 FOR I = 1 TO 3: HPLOT A(I),B(I): NEXT
40 Z = INT ( RND (1) * 3) + 1:X = A(Z):Y = B(Z): HPLOT X,Y
90 Z = INT ( RND (1) * 3) + 1:X1 = A(Z):Y1 = B(Z):Z1 = (X + X1) / 2:Z2 = (Y
+
Y1) / 2
140 HPLOT Z1,Z2:X = Z1:Y = Z2: GOTO 90
1 J = 9
2 FOR I = 1 TO J: READ A(I),B(I): NEXT
3 REM CHAOS.2-- by DAVID KONERDING-- DKONERDING@EAGLE.WESLEYAN.EDU
4 REM This allows any number of points. I haven't really spent much time
5 REM seeing how well it works, as it's much slower, but it seems nice.
6 REM I've set up a two-point system, also interesting. Anybody out there
7 REM with a good system-- fast, color, C or PASCAL, how about rewriting this
8 REM and seeing what the attractors look like at say, 20 or 30 points.
10 HOME : HGR : POKE - 16302,0: HCOLOR= 3
30 FOR I = 1 TO J: HPLOT A(I),B(I): NEXT
40 Z = INT ( RND (1) * J) + 1:X = A(Z):Y = B(Z): HPLOT X,Y
50 Z = INT ( RND (1) * J) + 1:X1 = A(Z):Y1 = B(Z):Z1 = (X + X1) / 2:Z2 = (Y
+
Y1) / 2
60 HPLOT Z1,Z2:X = Z1:Y = Z2: GOTO 50
100 DATA 0,0
110 DATA 0,191
120 DATA 279,0
130 DATA 279,191
140 DATA 140,96
150 DATA 140,191
160 DATA 140,0
170 DATA 0,96
180 DATA 279,96