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

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




PostPosted: Wed May 04, 2011 1:13 pm   Post subject: trippy stuff

import GUI
setscreen ("graphics:500;500")


loop
% first part
for i : 1 .. 500
drawline (0, maxy, i, maxy - round (sqrt (500 ** 2 - i ** 2)), Rand.Int (32, 103))
delay (2)
cls
end for

% second part
for j : 1 .. 500
drawline (maxx, maxy, maxy - round (sqrt (500 ** 2 - j ** 2)), maxx - j, Rand.Int (32, 103))
delay (2)
cls
end for

% third part
for decreasing l : 500 .. 1
drawline (maxx, 0, maxx - round (sqrt (500 ** 2 - l ** 2)), l, Rand.Int (32, 103))
delay (2)
cls
end for

% fourth part
for decreasing l : 500 .. 1
drawline (0, 0, l, round (sqrt (500 ** 2 - l ** 2)), Rand.Int (32, 103))
delay (2)
cls
end for
end loop
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Wed May 04, 2011 2:50 pm   Post subject: RE:trippy stuff

*cough*

http://compsci.ca/v3/viewtopic.php?t=7734

That said, invest into looking into View.Set("offscreenonly") and View.Update to lessen the jitterness. Perhaps using Draw.FillBox(0,0,maxx,maxy,black) instead of clearing the screen to white to allow the eyes to focus on the line.
Raknarg




PostPosted: Wed May 04, 2011 4:00 pm   Post subject: RE:trippy stuff

Also, for future reference, you don't need to call a new for loop name every time you use it as long as they're not nested in eachother. For instance:

for i : 1 .. 5
end for
for i : 1 .. 5
end for

That is completely allowed.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: