QB64 Phoenix Edition
Digital Cube - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7)
+---- Thread: Digital Cube (/showthread.php?tid=521)



Digital Cube - SierraKen - 06-04-2022

[Image: Sierraken-s-Digital-Cube.jpg]

Was playing with SIN and COS again today and came across a cool color-changing layered cube that changes from strange lines to fuzzy pixels. It's much brighter than this photo shows.

Code: (Select All)
Screen _NewImage(800, 600, 32)
_Title "Sierraken's Digital Cube"
Do
    _Limit 50
    c1 = Rnd * 255
    c2 = Rnd * 255
    c3 = Rnd * 255
    tt = (Rnd * 360)
    For t = 0 To tt Step .1
        r = (Rnd * 50) - 25
        x = (Sin(r) * 100 + r) + 400 + r
        y = (Cos(tt) * 100 + r) + 300 + r
        Circle (x, y), 1, _RGB32(c1, c2, c3)
    Next t
Loop Until InKey$ = Chr$(27)