Probably one of my signature code themes, I've played with Plasma the color sequencing method and with Plasma the 2D blobs. This thread is a study of the latter.
________________________________________________________________________________________________
The earliest QB64 file I can find is Ectoplasm more about Ghost busters than plasma the blobs but close enough:
________________________________________________________________________________________________
The earliest QB64 file I can find is Ectoplasm more about Ghost busters than plasma the blobs but close enough:
Code: (Select All)
_Title "Ectoplasm" 'mod of Galileo's at Retro 2019-06-22 B+
'open window 256, 256
Screen _NewImage(256, 256, 32)
Randomize Timer
'sh=peek("winheight")
sh = _Height
'sw=peek("winwidth")
sw = _Width
d = 1
Do
'tm = peek("secondsrunning")
tm = Timer(.001)
dr = ran(256): dg = ran(256): db = ran(256)
w = w + 5 / 83 '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< get things moving
For y = 0 To sh
For x = 0 To sw
vl = Sin(distance(x + tm, y, 128, 128) / 8 + w)
vl = vl + Sin(distance(x, y, 64, 64) / 8)
vl = vl + Sin(distance(x, y + tm / 7, 192, 64) / 7)
vl = vl + Sin(distance(x, y, 192, 100) / 8)
clr = 255 / (1.00001 * Abs(vl))
r = .9 * Abs(clr - dr): g = .4 * Abs(clr - dg): b = .5 * Abs(clr - db)
'COLOR r, g, b
'dot x, y
PSet (x, y), _RGB32(r, g, b)
Next
Next
If w > 1000 Or w < -1000 Then w = 0: d = d * -1
_Display
_Limit 200
Loop
Function distance (x1, y1, x2, y2) '//between two points x1,y1 and x2,y2
distance = ((x1 - x2) ^ 2 + (y1 - y2) ^ 2) ^ .5
End Function
Function ran% (sing)
ran% = Int(Rnd * sing) + 1
End Function
b = b + ...