Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Question
Author Message
85882

Posted: Fri Jun 13, 2003 4:41 pm   Post subject: Question

 code: var n: string var win := Window.Open ("graphics:400;125,position:300;400,nobuttonbar,noecho,nocursor") View.Set ("offscreenonly") var font := Font.New ("Sherwood:48:italic") var text : string := "*OOT Quiz*" var angle := 0 type dottype :     record         x, y, depth, middist : int     end record var dot : flexible array 1 .. 0 of dottype for decreasing i : 31 .. 16     Font.Draw (text, maxx div 2 - Font.Width (text, font) div 2, maxy div 3, font, i)     delay (60) end for for x : 0 .. Font.Width (text, font) div 3     for y : 0 .. 15         if whatdotcolour (x * 3 + maxx div 2 - Font.Width (text, font) div 2, y * 3 + maxy div 3) = 7 then             new dot, upper (dot) + 1             dot (upper (dot)).x := x * 3 - Font.Width (text, font) div 2             dot (upper (dot)).y := y             dot (upper (dot)).depth := Rand.Int (-5, 5) * 3         end if     end for end for for i : 16 .. 31     Font.Draw (text, maxx div 2 - Font.Width (text, font) div 2, maxy div 3, font, i)     delay (40) end for for decreasing j : 31 .. 16     for i : 1 .. upper (dot)         drawdot (dot (i).x + maxx div 2, dot (i).y * 3 + maxy div 3, j)     end for     delay (40) end for loop     for i : 1 .. upper (dot)         drawdot (round (cosd (angle + 90) * dot (i).depth) + round (cosd (angle) * dot (i).x) + maxx div 2, dot (i).y * 3 + maxy div 3, 54)     end for     angle += 5     if angle mod 180 = 0 then         delay (80)     else         delay (45)     end if     drawfillbox (0, maxy div 3 - 15, maxx, maxy div 3 + 55, 198) end loop

I want it to stop when it turns five times. How do I do that?

AsianSensation

Posted: Fri Jun 13, 2003 4:50 pm   Post subject: (No subject)

ahh, Mazer's text effects.

anyway, for the thing to turn once around, I assume you want it to turn 360 degrees, then since the angle+=5 every loop, then it takes 72 times for the thing to turn exacting once. multiply 72 by whatever times to get it to turn that many times.
Andy

Posted: Fri Jun 13, 2003 4:52 pm   Post subject: (No subject)

AsianSensation wrote:
ahh, Mazer's text effects.

anyway, for the thing to turn once around, I assume you want it to turn 360 degrees, then since the angle+=5 every loop, then it takes 72 times for the thing to turn exacting once. multiply 72 by whatever times to get it to turn that many times.

meng ur so damn confusing... and doreen's hair today made her look ho... drool... lol jk, jk,jk no i'm not after ur gf don't kill me
AsianSensation

Posted: Fri Jun 13, 2003 4:55 pm   Post subject: (No subject)

first of all, andy, I will kill you when I see you at math exam, second of all, I will elaborate on my explaination.

The angle increase by 5 every loop, then it takes 72 loops for the text to turn exactly once around. Multiply 72 by 5 will allow the text to turn 5 times around exactly.
Andy

Posted: Fri Jun 13, 2003 4:58 pm   Post subject: (No subject)

hmmm should've took a picture and use it as my avatar lol just playing with ya man, crush the crush remember?
naoki

Posted: Fri Jun 13, 2003 9:50 pm   Post subject: (No subject)

jeez andy stop this stupid crap
asok's gonna blam ur ass if he sees this

meng, do ur thing. i support u
Asok

Posted: Fri Jun 13, 2003 10:10 pm   Post subject: (No subject)

Locked for having an invalid subject title.

Btw, if you're going to mod someones code to make it appropriate to use, you could at least have the decency to do it yourself.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 7 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: