Ribbons
#1
A demo of what I call Plasma Coloring Method.

If color patterns capture your attention, you might be a visual thinker.

Code:
_TITLE "ribbons.bas QB64/51 trans 2017-10-31 bplus"
'ribbons.bas SmallBASIC 0.12.2 [B+=MGA] 2016-03-24
'new and improved update of SB and Bpf posts 2015-04-16 B+


CONST xmax = 600 '                 screen width
CONST ymax = 640 '                 screen height
SCREEN _NEWIMAGE(xmax, ymax, 32) ' make it so!
_SCREENMOVE 360, 60 '              adjust as needed _MIDDLE needs a delay .5 or more for me
RANDOMIZE TIMER

_PRINTSTRING (130, 610), "Wait 8 secs or press any for next screen..."
CONST a = 127
WHILE 1
    FOR ribbon = 0 TO 9

        'special random combination of color multipliers
        r = RND ^ 2: g = RND ^ 2: b = RND ^ 2

        FOR x = 1 TO 600

            'magic mix next color
            'alter x only by 1 but look at how the colors cycle !!!!
            colr& = _RGB(a + a * SIN(r * x), a + a * SIN(g * x), a + a * SIN(b * x))

            'draw a vertical line at x at height of 60 of our special m
            LINE (x, ribbon * 60 + 1)-STEP(0, 60), colr&
        NEXT
    NEXT
    SLEEP 8 '<=== waits 8 secs or key press
WEND


Attached Files Thumbnail(s)

B += x
Reply