Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
playing with turing graphics
Author Message
nelson

Posted: Wed Dec 31, 2003 5:28 pm   Post subject: playing with turing graphics

heh it's pretty cool

^^
 code: var a, b, x, y : int := 1 var a1, b1, x1, y1 : int := 1 var radius, xx, yy : int var c, cc : int := 104 var ch : string (1) randomize cc := 1 proc abc     loop         % randint (c, 20, 103)         drawline (x, y, x1, y1, black)         xx := floor ((x1 + x) / 2)         yy := floor ((y1 + y) / 2)         radius := floor (sqrt ((x1 - x) ** 2 + (y1 - y) ** 2))         drawoval (xx, yy, radius, radius, c)     %  <---- try change colour here         if x > maxx or 1 > x then             a := (a1) * -1         end if         if x1 > maxx or 1 > x1 then             a1 := (a1) * -1         end if         if y > maxy or 1 > y then             b := (b) * -1         end if         if y1 > maxy or 1 > y1 then             b1 := (b1) * -1         end if         delay (5)         drawline (x, y, x1, y1, white)         x := x + a         x1 := x1 + a1         y := y + b         y1 := y1 + b1         c := c + cc         if c > 254 then             cc := -1         end if         if c < 104 then             cc := 1         end if         exit when hasch     end loop     getch (ch)     return end abc loop     put "press anykey to start a new one"     delay (500)     randint (x, 1, maxx)     randint (y, 1, maxy)     randint (x1, 1, maxx)     randint (y1, 1, maxy)     abc     delay (500)     cls end loop

Boarder16

Posted: Thu Jan 01, 2004 9:29 pm   Post subject: (No subject)

its one of teh ugliest things i've ever seen in turing ..... but it's till somewhat complicated programming so its not all that bad........
MUAHAHAHAHHAHAHAHH!!! ahahahahhahahahahaa

Posted: Fri Jan 02, 2004 1:32 pm   Post subject: (No subject)

...lol, I think I remember myself doing the exact same thing when I got bored one day. Although the program is simple, I kind of like how when the line hit the edge, it would do this (slightly) 3D looking spin thing, heh.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 3 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: