Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Doodle
#1
This is a QB64 converted graphics demo by "Dav". It had no name... figured doodle is better than nothing... lol

Code:
' Open a window and enable double buffering.
set window "Doodle", 640, 640, false
set redraw off

visible i, t, x, y, w, h, pi

pi = 3.141592654
w = 640
h = 640

do
    t = t + 0.01
    set color 0, 0, 0, 25

    draw rect 0, 0, w, h, true
    for i = 1 to 8
        set color i * 32, i * 32 * 0.7, 0, i * 32
        for x = 0 to w
            y = 100 * sin(pi * x / w) * sin(1 * pi * x / w + t + i * t * pi * 0.1)
            draw ellipse x, h / 2 + y, i, i
            draw ellipse w / 2 + y, x, i, i
        next
    next

    redraw
    fwait 30
until keydown(KEY_ESCAPE, true)
Logic is the beginning of wisdom.
Reply
#2
Wow, that is awesome, and in such a small amount of code - thank you.
Reply
#3
Thank you. But as I stated earlier, it's not mine... lol You don't think that "I" am clever enough to come up with something like this one, do you? lol but, yes. Awesome with only a little code...
Logic is the beginning of wisdom.
Reply
#4
wow!! Incredible effect, sometimes I am impressed with what Naalaa is capable of.
Reply
#5
Modified version (add an interactivity)
- KEY-UP
- KEY-DOWN

Code:
'==================================
'Doodle (modified)
'originally written in QB64 by Dav
'converted to N7 by Johnno
'add interactivity in N7 by Micha
'==================================

'----------------
' INITIALIZATION
'----------------
#win32

w = 640
h = 640

set window "Doodle",w,h, false
set redraw off

'color definition
black = [0,0,0]

'interactivity
f = 100

'-------
' MAIN
'-------
do
    'timing
    t = t + 0.01
   
    'clear background
    set color black
    cls

    'interactivity control
    if keydown(KEY_UP) then
        f = f + 10
    elseif keydown(KEY_DOWN) then
        f = f - 10
    endif
   
    'draw waves
    for i = 1 to 8
        set color i*32,i*32*0.7,0 'color light transition
        for x = 0 to w           
            y = f * sin(PI * x/w ) * sin(PI * x/w  +  i * t * 0.3)
            draw ellipse x      , h/2 + y,i,i,true  'horizontal
            draw ellipse w/2 + y, x      ,i,i,true  'vertical
       next
    next
   
    redraw
    fwait 30
until keydown(KEY_ESCAPE, true)
Reply
#6
What did you do?!? Nah... Kidding... brilliant mod! Well done!
Logic is the beginning of wisdom.
Reply
#7
Magnificent!
Reply
#8
Looking really great
i will try translate to microA
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)