Computer Science Canada

Weird

Author:  rjm72 [ Mon Jan 03, 2005 12:42 pm ]
Post subject:  Weird

I thought this was cool i made it when is was just makin circles shrink and change color when i saw the black part i changed it and this is what i got try makin sum changes and see what u can come up with Very Happy

code:

var count : int
var rad : int
var col : int
rad := 200
col := 14
loop
    delay (20)
    col := col + 1
    if col = 30 then
        col := 15
        end if
        rad := rad - 1
        if rad = 1 then
        rad := 200
        end if
        drawfilloval (240, 200, rad, rad, col)
     
    end loop

Author:  Cervantes [ Mon Jan 03, 2005 4:47 pm ]
Post subject: 

Yep, looks funky.
Notice how you've got a normal loop, and you have a counting variable inside that loop. You can replace it with a for loop: less global variables, less confusion.

code:

var rad := 200
loop
    if rad <= 1 then
        rad := 200
    end if
    for kolor : 15 .. 29
        rad -= 1
        drawfilloval (240, 200, rad, rad, kolor)
        delay (20)
    end for
end loop

Author:  MiX-MaztA-M8riX [ Tue Jan 04, 2005 2:08 am ]
Post subject: 

wow, I was watching this, then eventually when it was at the first frame, I could see the other cirlces come into shape before they actually came into view, wow i like it Razz

Author:  zomg [ Tue Jan 04, 2005 1:45 pm ]
Post subject: 

mezmorizing... Shocked cant...stop...looking


: