Thank's, ya'll. My wife went off to rehearsal tonight, so that gave me some free time to make one last one (I have to code on the sly...)
- Dav
- Dav
Code: (Select All)
'SinCosPlay5.bas
'Dav, Nov/2025
Screen _NewImage(_DesktopHeight, Int(_DesktopHeight * .75), 32)
cw = _Width / 2: ch = _Height / 2
n = 24 'number of layers..24 is max of what my slow laptop can do smoothly
Do
Cls , _RGB(16, 16, 32)
For n = 0 To n Step .3
For i = 0 To 360 Step .2
a = i * _Pi / 180
rad = Sin(t + i * .002 + n * .003)
x = cw + rad * cw * Sin(a * 2 + t * 2 + n * .2) * Sin(a)
y = ch + rad * ch * Cos(a * 2 + t * 3 + n * .2) * Cos(a)
'uncomment below to add rotation
'x = cw + ((x - cw) * Cos(t) - (y - ch) * Sin(t))
'y = ch + ((x - cw) * Sin(t) + (y - ch) * Cos(t))
r = 127 + 127 * Sin(a * 4 + t + n * .2)
g = 127 + 127 * Sin(a * 4 + t + n * .2 + _Pi / 3)
b = 127 + 127 * Sin(a * 4 + t + n * .2 + 2 * _Pi / 3)
Line (x, y)-Step(4, 4), _RGBA(r * 2, g * 2, b * 2, 5), BF
Next
Next
t = t + .02
_Display
_Limit 30
Loop Until _KeyHit

