|
Post by bplus on May 31, 2024 18:39:17 GMT -5
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)
|
|
|
Post by bplus on May 31, 2024 18:41:01 GMT -5
2 variations by visionmerce
' A loose translation of bubble_universe2 ' https://github.com/ZXDunny/SpecBAS-Demos/blob/master/Graphics/bubble_universe2 Const w = 480 Const m = 200 Const r = _Pi * 2 Dim x, y, t, i, j, u Screen _NewImage(w, w, 32) Do Cls For i = 0 To m For j = 0 To m u = Sin(i + y) + Sin(i + x) y = Cos(i + y) + Cos(i + x) x = u + t PSet (u * m / 2 + w / 2, y * m / 2 + w / 2.3), _RGB(j, i, 127) Next Next t = t + .005 _Display _Limit 30 Loop
' A loose translation of bubble_universe3 ' https://github.com/ZXDunny/SpecBAS-Demos/blob/master/Graphics/bubble_universe3 Const w = 480, n = 200 Dim x Dim y Dim t: t = 9 Screen _NewImage(480, 480, 32) Do Cls For i = 0 To n For j = 0 To n u = Sin(i + y) + Sin(j / (n * _Pi) + x) v = Cos(i + y) + Cos(j / (n * _Pi) + x) x = u + t y = v + t PSet (u * 100 + w / 2, v * 100 + w / 2), _RGB(i, j, 99) Next j, i t = t + .005 _Display '_Limit 30 Loop
|
|
|
Post by aurel on Jun 2, 2024 8:34:39 GMT -5
well WE can post in any language including any compiler ..even inn C BUT in specBas work the BEST...YES
|
|
|
Post by zxdunny on Jun 10, 2024 3:50:34 GMT -5
BUT in specBas work the BEST...YES That is true for a great many things ![:D](//storage.proboards.com/forum/images/smiley/grin.png)
|
|