OK here is a mod
BTW if you hit a key and see a blank black screen just hold on for a minute to see a special effect.
Code: (Select All)
_Title "bplus mod Dav 'Pulse' Plasma Blend, go ahead and press a key, esc to quit.." ' b+ 2024-10-02
' thankyou Dav for nice blended plasma effect, now I play with it :D
Screen _NewImage(800, 600, 32)
_ScreenMove 250, 60
cx = _Width / 2
cy = _Height / 2
m1 = 9
m2 = 27
m3 = 3
Do
If InKey$ <> "" Then
m3 = Int(Rnd * 12)
m = Int(Rnd * 3) + 2
m1 = m * m3
m2 = m * m1
End If
t = t + .01 ' mod
pulse = Sin(t) * .8 'pulse factor
For y = 0 To _Height Step 3
For x = 0 To _Width Step 3
a = _Atan2(y - cy, x - cx) + t
rad = Sqr((x - cx) ^ 2 + (y - cy) ^ 2) / 100
'1st plasma colors
r1 = (Sin(rad * m3 + t) + Sin(a * m1 + t)) * 127 '+ 128
g1 = (Sin(rad * m3 + t + 1) + Sin(a * m1 + t + 1)) * 127 '+ 128
b1 = (Sin(rad * m3 + t + 2) + Sin(a * m1 + t + 2)) * 127 ' + 128
'2nd plasma colors
r2 = (Sin(rad * 3 + t) + Sin(a * 3 + t + 1)) * 127 + 128
g2 = (Sin(rad * 3 + t + 2) + Sin(a * m2 + t + 3)) * 127 + 128
b2 = (Sin(rad * 3 + t + 4) + Sin(a * m2 + t + 4)) * 127 + 128
'Blend plasma colors using pulse factor
r = r1 * (1 - pulse) + r2 * pulse
g = g1 * (1 - pulse) + g2 * pulse
b = b1 * (1 - pulse) + b2 * pulse
Line (x, y)-Step(2, 2), _RGB(r, g, b), BF
Next
Next
_Display
_Limit 30
Loop Until _KeyDown(27)
BTW if you hit a key and see a blank black screen just hold on for a minute to see a special effect.
b = b + ...