Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 strange affect
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
endusto




PostPosted: Mon Feb 14, 2005 1:04 pm   Post subject: strange affect

code:
var touch, cont:int := 0
View.Set ("graphics:640;480")

loop
if (touch = 0) then
drawline(640 div 2, 480 div 2, Rand.Int(1,640), Rand.Int(1,480), red)
cont += 1
if cont = 50000 then
touch := 1
cont := 0
end if


elsif (touch = 1) then
drawline(640 div 2, 480 div 2, Rand.Int(1,640), Rand.Int(1,480), green)
cont += 1
if cont = 50000 then
touch := 2
cont := 0
end if

elsif (touch = 2) then
drawline(640 div 2, 480 div 2, Rand.Int(1,640), Rand.Int(1,480), blue)
cont += 1
if cont = 50000 then
touch := 3
cont := 0
end if


elsif (touch = 3) then
drawline(640 div 2, 480 div 2, Rand.Int(1,640), Rand.Int(1,480), yellow)
cont += 1
if cont = 50000 then
touch := 0
cont := 0
end if



end if
end loop
Sponsor
Sponsor
Sponsor
sponsor
Token




PostPosted: Mon Feb 14, 2005 4:43 pm   Post subject: mmhm

wow thats pretty cool, but when you name a topic try to make it describe the program or question better, strange effect dosent really tell us much. but good job on that effect, check out this one i did, kinda the same principal


code:

drawfillbox (0, 0, maxx, maxy, black)

loop
    var x1 : int := Rand.Int (maxx div 2 - 150, maxx div 2 + 150)
    var x2 : int := Rand.Int (maxx div 2 - 150, maxx div 2 + 150)
    var y1 : int := Rand.Int (maxy div 2 - 150, maxy div 2 + 150)
    var y2 : int := Rand.Int (maxy div 2 - 150, maxy div 2 + 150)
    drawline (x1, y1, x2, y2, white)
    delay (5)
end loop



its kinda cool what you can do just by drawing lines and dots, also check out this tv one, it works on the same idea also

code:


var x1, y1, x2, y2, x3, y3, x4, y4 : int


drawfillbox (0, 0, maxx, maxy, brightblue)
drawline (maxx div 2, maxy div 2 + 120, maxx div 2 - 50, maxy div 2 + 180, black)
drawline (maxx div 2, maxy div 2 + 120, maxx div 2 + 50, maxy div 2 + 180, black)
drawfilloval (maxx div 2 + 50, maxy div 2 + 180, 3, 3, black)
drawfilloval (maxx div 2 - 50, maxy div 2 + 180, 3, 3, black)
drawfillbox (maxx div 2 + 120, maxy div 2 + 120, maxx div 2 - 120, maxy div 2 - 120, black)
drawfillbox (0, 0, maxx, maxy div 2 - 180, brown)
drawbox (0, 0, maxx, maxy div 2 - 180, black)
for i : 0 .. 10
    drawline (maxx div 2 - 150 + i, maxy div 2 - 180, maxx div 2 - 120 + i, maxy div 2 - 120, black)
    drawline (maxx div 2 + 150 - i, maxy div 2 - 180, maxx div 2 + 120 - i, maxy div 2 - 120, black)
end for


    loop
        x1 := Rand.Int (maxx div 2 - 100, maxx div 2 + 100)
        y1 := Rand.Int (maxy div 2 - 100, maxy div 2 + 100)
        x2 := Rand.Int (maxx div 2 - 100, maxx div 2 + 100)
        y2 := Rand.Int (maxy div 2 - 100, maxy div 2 + 100)
        x3 := Rand.Int (maxx div 2 - 100, maxx div 2 + 100)
        y3 := Rand.Int (maxy div 2 - 100, maxy div 2 + 100)
        x4 := Rand.Int (maxx div 2 - 100, maxx div 2 + 100)
        y4 := Rand.Int (maxy div 2 - 100, maxy div 2 + 100)

        drawdot (x2 + 1, y2 + 1, white)
        drawdot (x2, y2, white)
        drawdot (x1 + 1, y1 + 1, black)
        drawdot (x1, y1, black)




    end loop

ssr




PostPosted: Mon Feb 14, 2005 8:48 pm   Post subject: (No subject)

lol, both of them are pretty cool, you guys should make some animations out of it eh?
Token




PostPosted: Mon Feb 14, 2005 9:30 pm   Post subject: actually...

actually i already did, this is a kinda crappy thing from the ring, when the ring keeps flashing on the screen... lol its the only thing i could think to do with it...


thering.zip
 Description:
it is... the ring ;)

Download
 Filename:  thering.zip
 Filesize:  56.8 KB
 Downloaded:  165 Time(s)

Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: