Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plasma Studies
#1
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:
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


Attached Files Image(s)
   
b = b + ...
Reply


Messages In This Thread
Plasma Studies - by bplus - 05-03-2022, 08:03 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:08 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:12 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:16 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:21 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:26 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:31 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:35 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:38 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:45 PM
RE: Plasma Studies - by bplus - 05-03-2022, 08:49 PM
RE: Plasma Studies - by Dav - 05-03-2022, 11:16 PM
RE: Plasma Studies - by bplus - 05-03-2022, 11:53 PM
RE: Plasma Studies - by Coolman - 05-04-2022, 11:00 AM
RE: Plasma Studies - by vince - 05-05-2022, 12:34 AM



Users browsing this thread: 1 Guest(s)