Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small 25 line program
#15
I found another version of this through Johnno at RCBasic which came from Marcus at Naalaa from SpecBas by Paul Dunn, so this gets around! I like coloring and slowed it down with making t much smaller:

Code: (Select All)
Const xmax = 512, ymax = 512
_Title "Bubble Universe - ESC to exit" ' from johnno at RCBasic forum 2022-11-14
Screen _NewImage(xmax, ymax, 32)
' ---------------
' Paul Dunn posted this code but for SpecBAS in a facebook group.
' It looked so cool that I had to  rewrite it in Naalaa 7. Marcus
'
' bplus QB64 Mod of RCB version by Johnno56
TAU = 6.283185307179586
n = 200
r = TAU / 235
x = 0
y = 0
v = 0
t = 0
hw = xmax / 2
hh = ymax / 2
Do
    Color _RGB32(0, 0, 0)
    Cls
    For i = 0 To n
        For j = 0 To n
            u = Sin(i + v) + Sin(r * i + x)
            v = Cos(i + v) + Cos(r * i + x)
            x = u + t
            Color _RGB(i, j, 99)
            PSet (hw + u * hw * 0.4, hh + v * hh * 0.4)
        Next
    Next
    t = t + 0.001 ' slowed way way down from .025
    _Display
    _Limit 30
Loop Until _KeyDown(27)
b = b + ...
Reply


Messages In This Thread
Small 25 line program - by Gadgetjack - 11-15-2022, 06:40 PM
RE: Small 25 line program - by bplus - 11-15-2022, 07:15 PM
RE: Small 25 line program - by Gadgetjack - 11-15-2022, 07:19 PM
RE: Small 25 line program - by bplus - 11-15-2022, 07:20 PM
RE: Small 25 line program - by CharlieJV - 11-15-2022, 07:30 PM
RE: Small 25 line program - by bplus - 11-15-2022, 08:06 PM
RE: Small 25 line program - by CharlieJV - 11-15-2022, 08:10 PM
RE: Small 25 line program - by Gadgetjack - 11-15-2022, 08:20 PM
RE: Small 25 line program - by mnrvovrfc - 11-15-2022, 08:56 PM
RE: Small 25 line program - by mnrvovrfc - 11-15-2022, 09:07 PM
RE: Small 25 line program - by dbox - 11-15-2022, 11:24 PM
RE: Small 25 line program - by bplus - 11-15-2022, 11:33 PM
RE: Small 25 line program - by CharlieJV - 11-16-2022, 12:09 AM
RE: Small 25 line program - by SMcNeill - 11-15-2022, 11:58 PM
RE: Small 25 line program - by bplus - 11-20-2022, 09:49 AM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 05:09 PM
RE: Small 25 line program - by Pete - 11-20-2022, 11:22 AM
RE: Small 25 line program - by bplus - 11-20-2022, 04:33 PM
RE: Small 25 line program - by bplus - 11-20-2022, 06:05 PM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 06:20 PM
RE: Small 25 line program - by bplus - 11-20-2022, 07:05 PM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 07:41 PM
RE: Small 25 line program - by bplus - 11-21-2022, 10:10 AM



Users browsing this thread: 1 Guest(s)