05-19-2022, 08:33 PM
Bert's Fractal
Here is nice one from Bert that I saved from around time I started at net?
Code: (Select All)
Rem According to Wikipedia, "In mathematics a fractal is an abstract object
Rem used to describe and simulate naturally occurring objects. Artificially
Rem created fractals commonly exhibit similar patterns at increasingly small
Rem scales. It is also known as expanding symmetry or evolving symmetry."
Rem
Rem The evolving symmetry is created via an iterative process.
Rem
Rem Program creates a rotating fractal consisting of squares.
Rem -------
_Title "Bert's Fractal Squares 2017-10-25 mods by B + "
Screen _NewImage(700, 700, 12)
_ScreenMove 360, 30
While 1
frac 5
_Delay 1
frac2 5
Wend
Sub frac (ii) 'now it's a fractal and now its rotating
i = ii
Line ((350 - i), (350 - i) - (i - 5))-((350 + i) + (i - 5), (350 - i)), 14, B
_Delay .05
Line ((350 - i), (350 - i) - (i - 5))-((350 - i) - (i - 5), (350 + i)), 12, B
_Delay .05
Line ((350 + i), (350 + i) + (i - 5))-((350 - i) - (i - 5), (350 + i)), 2, B
_Delay .05
Line ((350 + i), (350 + i) + (i - 5))-((350 + i) + (i - 5), (350 - i)), 9, B
_Delay .05
i = i + 5
If i < 170 Then frac (i)
End Sub
Sub frac2 (ii) 'now it's a fractal and now its rotating
i = ii
Line ((350 - i), (350 - i) - (i - 5))-((350 + i) + (i - 5), (350 - i)), 0, B
_Delay .05
Line ((350 - i), (350 - i) - (i - 5))-((350 - i) - (i - 5), (350 + i)), 0, B
_Delay .05
Line ((350 + i), (350 + i) + (i - 5))-((350 - i) - (i - 5), (350 + i)), 0, B
_Delay .05
Line ((350 + i), (350 + i) + (i - 5))-((350 + i) + (i - 5), (350 - i)), 0, B
_Delay .05
i = i + 5
If i < 170 Then frac2 (i)
End Sub
b = b + ...