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

Posted: Tue Mar 16, 2004 1:16 pm   Post subject: Awesome graphs

bored
 code: colorback (black) cls setscreen ("offscreenonly") var y, x := 0.0; color (white) for t : 1 .. 36000     x := (sin (t / 10) * 300) * sin (t)     y := (cos (t / 10) * 200) * sin (t)     drawdot (round (x) + 320, round (y) + 200, white); end for View.Update

 code: colorback (black) cls setscreen ("offscreenonly") var y, x := 0.0; color (white) for t : 1 .. 36000     x := (sin (t / 10) * 300) * cos (t)     y := (cos (t / 10) * 200) * sin (t)     drawdot (round (x) + 320, round (y) + 200, white); end for View.Update

Homer_simpson

Posted: Tue Mar 16, 2004 1:26 pm   Post subject: (No subject)

 code: setscreen ("offscreenonly") var y, x := 0.0; colorback (black) cls for i : 3 .. 11     for t : 1 .. 36000         x := (sin (t / 10) ** i) * 200         y := (cos (t / 10) ** i) * 100         drawdot (round (x) + 320, round (y) + 200, white);     end for end for View.Update

this one will take a while to load
 code: setscreen ("offscreenonly") var y, x := 0.0; colorback (black) cls for i : 1 .. 399 by 2     for t : 1 .. 3600         x := (sin (t / 100) ** 1) * 200         y := (cos (t / 100) ** i) * 100         drawdot (round (x) + 320, round (y) + 200, white);     end for end for View.Update

 code: setscreen ("offscreenonly") var y, x := 0.0; colorback (black) cls for t : 1 .. 36000     x := ((cos (t / 100)) * 100) + t / 100     y := ((sin (t / 100)) * 200) + t / 100     drawdot (round (x), round (y), white); end for for decreasing t : 36000 .. 1     x := ((cos (t / 100)) * 100) + t / 100 + 360     y := ((sin (t / 100)) * 200) + 360 - (t / 100)     drawdot (round (x), round (y), white); end for View.Update
AsianSensation

Posted: Tue Mar 16, 2004 2:13 pm   Post subject: (No subject)

funky, I especially liked the one that took a long time to load, looked like a big giant eye.
Cervantes

Posted: Tue Mar 16, 2004 5:59 pm   Post subject: (No subject)

looks cool. I also like the eye one

I notice you've got a bunch of semi-colons in there. Is that a habit from Java?
Those ; didn't mess up the program. Interesting... I suppose Turing uses those ; but doesn't require them?
Catalyst

Posted: Tue Mar 16, 2004 7:05 pm   Post subject: (No subject)

turing seems not to care whether use traditional semi-colons or its system
for example this runs fine
 code: setscreen ("offscreenonly");var y, x := 0.0;colorback (black);cls; for t : 1 .. 36000 x := ((cos (t / 100)) * 100) + t / 100; y := ((sin (t / 100)) * 200) + t / 100; drawdot (round (x), round (y), white); end for for decreasing t : 36000 .. 1 x := ((cos (t / 100)) * 100) + t / 100 + 360; y := ((sin (t / 100)) * 200) + 360 - (t / 100); drawdot (round (x), round (y), white); end for View.Update;
recneps

Posted: Tue Mar 16, 2004 9:09 pm   Post subject: (No subject)

That explains the setscreen
setscreen("graphics:300;300;nobuttonbar;nocursor;offscreenonly")
is the same as
setscreen("graphics")
setscreen("300;300")
setscreen("nobuttonbar")
setscreen("nocursor")
setscreen("offscreenonly")

the list goes on.

And Thats some cool effects homer, i still dont know what sin and cos are exactly.... oh well ill know by June in end of math ;D
SuperGenius

Posted: Tue Mar 16, 2004 9:33 pm   Post subject: (No subject)

Very neat.

I also liked the one that looked like an eye. It reminded me of the Eye of Barad-Ur(sp?)... ie. Sauron's tower in lord of the rings
Homer_simpson

Posted: Wed Mar 17, 2004 4:36 am   Post subject: (No subject)

Catalyst wrote:
turing seems not to care whether use traditional semi-colons or its system
for example this runs fine
 code: setscreen ("offscreenonly");var y, x := 0.0;colorback (black);cls; for t : 1 .. 36000 x := ((cos (t / 100)) * 100) + t / 100; y := ((sin (t / 100)) * 200) + t / 100; drawdot (round (x), round (y), white); end for for decreasing t : 36000 .. 1 x := ((cos (t / 100)) * 100) + t / 100 + 360; y := ((sin (t / 100)) * 200) + 360 - (t / 100); drawdot (round (x), round (y), white); end for View.Update;

lol...
yeah just use ; i dunno... i guess it's a force of habbit...

Mazer

Posted: Wed Mar 17, 2004 8:13 am   Post subject: (No subject)

SuperGenius wrote:
Very neat.

I also liked the one that looked like an eye. It reminded me of the Eye of Barad-Ur(sp?)... ie. Sauron's tower in lord of the rings

I think it'd be Barad-dur. Something along the lines of 'tower of darkness' or some such evil. And yeah, I totally agree, that's just what I was thinking when I saw it.
Cervantes

Posted: Wed Mar 17, 2004 9:14 am   Post subject: (No subject)

what's more is that, when you take the code that catalyst posted, and take iout the ;s it works fine too. You could probably condense short1's pac man into one line of code
Homer_simpson

Posted: Thu Mar 18, 2004 3:12 am   Post subject: (No subject)

setscreen ("offscreenonly")
var y, x := 0.0;
colorback (black)
cls
for i : 1 .. 399 by 2
for t : 1 .. 3600
x := (sin (t / 100) ** 1) * 200
y := (cos (t / 100) ** i) * 100
drawdot (round (x) + 320, round (y) + 200, 44 - ((i div 67) mod 6));
end for
end for
View.Update

makes it look like that eye thingy in lord of the rings =Ãž
Mazer

Posted: Thu Mar 18, 2004 10:04 am   Post subject: (No subject)

Look at these, I just stumbled upon lituus spirals the other day and I've been playing around with them... who would've imagined math could not suck?

Lituus spiral: r^2 = a^2 / theta

 code: setscreen ("graphics:max;max,nobuttonbar") var a := 800 var spacing := 1 drawfillbox (0, 0, maxx, maxy, 0) drawline (maxx div 2, 0, maxx div 2, maxy, 23) drawline (0, maxy div 2, maxx, maxy div 2, 23) for i : 1 .. 1080 by spacing     drawline (maxx div 2 + round (a / sqrt (i) * cosd (i)), maxy div 2 + round (a / sqrt (i) * sind (i)),         maxx div 2 + round (a / sqrt (i + spacing) * cosd (i + spacing)), maxy div 2 + round (a / sqrt (i + spacing) * sind (i + spacing)), 12)     drawline (maxx div 2 - round (a / sqrt (i) * cosd (i)), maxy div 2 - round (a / sqrt (i) * sind (i)),         maxx div 2 - round (a / sqrt (i + spacing) * cosd (i + spacing)), maxy div 2 - round (a / sqrt (i + spacing) * sind (i + spacing)), 12)     drawline (maxx div 2 + round (a / sqrt (i) * sind (i)), maxy div 2 - round (a / sqrt (i) * cosd (i)),         maxx div 2 + round (a / sqrt (i + spacing) * sind (i + spacing)), maxy div 2 - round (a / sqrt (i + spacing) * cosd (i + spacing)), 12)     drawline (maxx div 2 - round (a / sqrt (i) * sind (i)), maxy div 2 + round (a / sqrt (i) * cosd (i)),         maxx div 2 - round (a / sqrt (i + spacing) * sind (i + spacing)), maxy div 2 + round (a / sqrt (i + spacing) * cosd (i + spacing)), 12) end for

And this one (takes a little while to run)
 code: setscreen ("graphics:max;max,nobuttonbar") var spacing := 2 var clr : int drawfillbox (0, 0, maxx, maxy, 7) drawline (maxx div 2, 0, maxx div 2, maxy, 23) drawline (0, maxy div 2, maxx, maxy div 2, 23) for i : 0 .. 255     RGB.SetColour (i, i / 255, i / 255, i * 4 / 5 / 255) end for for a : 1 .. 800 by 5     for theta : 1 .. 540 by spacing         clr := round (a * 255 / 1200)         Draw.ThickLine (maxx div 2 + round (a / sqrt (theta) * cosd (theta)), maxy div 2 + round (a / sqrt (theta) * sind (theta)),             maxx div 2 + round (a / sqrt (theta + spacing) * cosd (theta + spacing)), maxy div 2 + round (a / sqrt (theta + spacing) * sind (theta + spacing)), 2, clr)         Draw.ThickLine (maxx div 2 - round (a / sqrt (theta) * cosd (theta)), maxy div 2 - round (a / sqrt (theta) * sind (theta)),             maxx div 2 - round (a / sqrt (theta + spacing) * cosd (theta + spacing)), maxy div 2 - round (a / sqrt (theta + spacing) * sind (theta + spacing)), 2, clr)         Draw.ThickLine (maxx div 2 + round (a / sqrt (theta) * sind (theta)), maxy div 2 - round (a / sqrt (theta) * cosd (theta)),             maxx div 2 + round (a / sqrt (theta + spacing) * sind (theta + spacing)), maxy div 2 - round (a / sqrt (theta + spacing) * cosd (theta + spacing)), 2, clr)         Draw.ThickLine (maxx div 2 - round (a / sqrt (theta) * sind (theta)), maxy div 2 + round (a / sqrt (theta) * cosd (theta)),             maxx div 2 - round (a / sqrt (theta + spacing) * sind (theta + spacing)), maxy div 2 + round (a / sqrt (theta + spacing) * cosd (theta + spacing)), 2, clr)     end for end for
AsianSensation

Posted: Thu Mar 18, 2004 10:39 am   Post subject: (No subject)

nice, very.
recneps

Posted: Thu Mar 18, 2004 1:38 pm   Post subject: (No subject)

pretty cool stuff there mazer, i agree, who thought that math could be remotely cool?
sport

Posted: Thu Mar 18, 2004 7:09 pm   Post subject: Bored

It seems like the best works come out as a result of being bored, so let's get bored.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 2  [ 22 Posts ]
Goto page 1, 2  Next
 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: