07-12-2022, 02:29 AM
I made this as an inspiration to B+'s a few years ago. It shows 17 different polygons in order, in random color, layered in giant circles. It changes every 2 seconds and loops back to 3 sides after 20 sides. Thanks B+ for helping me get this far.
Code: (Select All)
'Polygon Artwork
'Thanks to B+ for the inspiration to make this.
Dim cl As Long
Screen _NewImage(800, 600, 32)
sides = 3
Do
Locate 1, 1: Print "Sides: "; sides
st = Int(360 / sides)
cl = _RGB32(255 * Rnd, 255 * Rnd, 255 * Rnd)
x = 250
y = 300
For tt = 0 To 360 Step 10
For deg = 0 + tt To 360 + tt Step st
oldx = x
oldy = y
For t = 1 To 40 Step .25
x = (Sin(_D2R(deg)) * t) + oldx
y = (Cos(_D2R(deg)) * t) + oldy
Circle (x, y), 1, cl
Next t
Next deg
Next tt
sides = sides + 1
If sides > 20 Then sides = 3
_Delay 2
_Display
Cls
Loop Until InKey$ = Chr$(27)