09-09-2005, 03:27 AM
I have begun on a quest to learn fractals, especially these kind of
"attractor" fractals that I find very beautiful...
[syntax="qbasic"]defdbl a-z
screen 20,32,,1
dim sprite(0 to 4) as integer
pset (0,0),rgb(255,255,255)
get (0,0)-(0,0),sprite
cls
a = 1.5: b = -1.8: c = 1.6: d = 0.9
x=0:y=0
do
i$=inkey$
x = sin(a*oy)+c*cos(a*ox)
y = sin(b*ox)+d*cos(b*oy)
put(x*175+511,y*175+383),sprite,alpha,1
ox=x
oy=y
loop while i$=""[/syntax]
"attractor" fractals that I find very beautiful...
[syntax="qbasic"]defdbl a-z
screen 20,32,,1
dim sprite(0 to 4) as integer
pset (0,0),rgb(255,255,255)
get (0,0)-(0,0),sprite
cls
a = 1.5: b = -1.8: c = 1.6: d = 0.9
x=0:y=0
do
i$=inkey$
x = sin(a*oy)+c*cos(a*ox)
y = sin(b*ox)+d*cos(b*oy)
put(x*175+511,y*175+383),sprite,alpha,1
ox=x
oy=y
loop while i$=""[/syntax]