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

Posted: Sun Nov 30, 2003 8:59 pm   Post subject: Spirographs

 code: View.Set ("nocursor,nobuttonbar,title:Spirograph") var R : real := Rand.Int (20, 35) var r : real := Rand.Int (20, 35) var O : real := Rand.Int (5, 10) var T : real := Rand.Int (100, 400) var x, y, oldx, oldy : real := 0 var g : string (1) loop     put "1. Random\n2. Specify"     getch (g)     exit when g = '1' or g = '2' end loop if g = '2' then     put "R [Fixed circle radius]: " ..     get R     put "r [Moving circle radius]: " ..     get r     put "O [Offset of the moving circle]: " ..     get O     put "T [# of circles]: " ..     get T end if cls put "\nR: ", R .. put "\nr: ", r .. put "\nO: ", O .. put "\nT: ", T .. for t : 1 .. round (T)     oldx := x     oldy := y     x := (R + r) * cos (t) - (r + O) * cos (((R + r) / r) * t)     y := (R + r) * sin (t) - (r + O) * sin (((R + r) / r) * t)     if t > 1 then         drawline (round (x) + maxx div 2, round (y) + maxy div 2, round (oldx) + maxx div 2, round (oldy) + maxy div 2, 255)     end if end for

jamez

Posted: Sun Nov 30, 2003 9:00 pm   Post subject: (No subject)

P.S. long time no see peeps
Andy

Posted: Sun Nov 30, 2003 9:04 pm   Post subject: (No subject)

hmmm interesting... although you could've drawn it once and use Pic.Rotate
CITC

Posted: Sun Jan 11, 2004 6:55 pm   Post subject: (No subject)

awesome, looks really cool!
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

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