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

Username:   Password: 
 RegisterRegister   
 Turing Contest 255chr max - changed to 20 line max
Index -> Contests
Goto page Previous  1, 2, 3, 4, 5  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

And the winner is :
(Voting is closed)
not buzpodder's graphics
28%
 28%  [ 2 ]
zylum's graphics
0%
 0%  [ 0 ]
catalyst's graphics
0%
 0%  [ 0 ]
GlobeTrotter's graphics
0%
 0%  [ 0 ]
beard0's graphics
0%
 0%  [ 0 ]
Delos's Blackjack
14%
 14%  [ 1 ]
zylum's graphics (2)
0%
 0%  [ 0 ]
beard0's TicTacToe
28%
 28%  [ 2 ]
Delos's Flashy Pong
0%
 0%  [ 0 ]
zylum's green screen
14%
 14%  [ 1 ]
Catalyst's Pong
0%
 0%  [ 0 ]
Tony's Snake
14%
 14%  [ 1 ]
TheFerret's graphics
0%
 0%  [ 0 ]
Total Votes : 7

Author Message
Hikaru79




PostPosted: Thu Nov 11, 2004 11:09 pm   Post subject: (No subject)

Shocked Shocked Shocked Shocked

Holy crap! beard0, add homer to the poll, I am so voting for him! Very Happy

Man, is homer the undisputed master of 3d around here? =)
Sponsor
Sponsor
Sponsor
sponsor
apomb




PostPosted: Fri Nov 12, 2004 1:23 am   Post subject: (No subject)

hey i didnt see this before, i could have put my parametric program here...

well i modded it, alot shorter, catalyst: do your damndest to make it better... im serious, please

code:
setscreen ("graphics:200;200,nobuttonbar,offscreenonly,title:please wait")
var a1, a := 800
var spacing1 := 1800
var spacing := 1
loop
    colorback (7)
    cls
    for i : 1 .. 1800 by spacing
        drawline (maxx div 2 + round (a1 / sqrt (i) * cosd (i)), maxy div 2 + round (a1 / sqrt (i) * sind (i)), maxx div 2 + round (a1 / sqrt (i + spacing) * cosd (i + spacing)), maxy div 2 + round (a1 / sqrt (i + spacing) * sind (i + spacing)), 0)
        drawline (maxx div 2 - round (a1 / sqrt (i) * cosd (i)), maxy div 2 - round (a1 / sqrt (i) * sind (i)), maxx div 2 - round (a1 / sqrt (i + spacing) * cosd (i + spacing)), maxy div 2 - round (a1 / sqrt (i + spacing) * sind (i + spacing)), 0)
        drawline (maxx div 2 + round (a1 / sqrt (i) * sind (i)), maxy div 2 - round (a1 / sqrt (i) * cosd (i)), maxx div 2 + round (a1 / sqrt (i + spacing) * sind (i + spacing)), maxy div 2 - round (a1 / sqrt (i + spacing) * cosd (i + spacing)), 0)
        drawline (maxx div 2 - round (a1 / sqrt (i) * sind (i)), maxy div 2 + round (a1 / sqrt (i) * cosd (i)), maxx div 2 - round (a1 / sqrt (i + spacing) * sind (i + spacing)), maxy div 2 + round (a1 / sqrt (i + spacing) * cosd (i + spacing)), 0)
        delay (2)
    end for
    exit when (spacing = 901)
    spacing += 2
    Text.Locate (1, 1)
    View.Update
end loop


ha! only 19 lines Smile
Cervantes




PostPosted: Sun Nov 21, 2004 7:46 am   Post subject: (No subject)

ha! your program in 13 lines Razz

EDIT: woops, forgot the code Laughing
code:
setscreen ("graphics:200;200,nobuttonbar,offscreenonly,title:please wait")
for spacing : 1 .. 901 by 2
    colorback (7)
    cls
    for i : 1 .. 1800 by spacing
        drawline (maxx div 2 + round (800 / sqrt (i) * cosd (i)), maxy div 2 + round (800 / sqrt (i) * sind (i)), maxx div 2 + round (800 / sqrt (i + spacing) * cosd (i + spacing)), maxy div 2 +
            round (800 / sqrt (i + spacing) * sind (i + spacing)), 0)
        drawline (maxx div 2 - round (800 / sqrt (i) * cosd (i)), maxy div 2 - round (800 / sqrt (i) * sind (i)), maxx div 2 - round (800 / sqrt (i + spacing) * cosd (i + spacing)), maxy div 2 -
            round (800 / sqrt (i + spacing) * sind (i + spacing)), 0)
        drawline (maxx div 2 + round (800 / sqrt (i) * sind (i)), maxy div 2 - round (800 / sqrt (i) * cosd (i)), maxx div 2 + round (800 / sqrt (i + spacing) * sind (i + spacing)), maxy div 2 -
            round (800 / sqrt (i + spacing) * cosd (i + spacing)), 0)
        drawline (maxx div 2 - round (800 / sqrt (i) * sind (i)), maxy div 2 + round (800 / sqrt (i) * cosd (i)), maxx div 2 - round (800 / sqrt (i + spacing) * sind (i + spacing)), maxy div 2 +
            round (800 / sqrt (i + spacing) * cosd (i + spacing)), 0)
        delay (2)
    end for
    View.Update
end for
apomb




PostPosted: Mon Nov 22, 2004 12:47 pm   Post subject: (No subject)

WOW! i knew it could be don simpler ... now make it go the other way too ... in less than 20 lines!

Thats some nifty coding there Cervantes ... just some for loops Embarassed how foolish of me to not realise their power!
MyPistolsIn3D




PostPosted: Tue Nov 23, 2004 6:53 pm   Post subject: (No subject)

wow, lotsa sweet programs. I like catalyst's one with the waves going out the best.
Tony




PostPosted: Sun Nov 28, 2004 11:56 pm   Post subject: (No subject)

Cervantes's gravity has been slip off to here
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
TheZsterBunny




PostPosted: Fri Feb 04, 2005 6:21 am   Post subject: (No subject)

Ferret, you're cured. I've narrowed your code down to 19 lines

code:

% Pyramid by Travis Barker - ZB Edit
setscreen ("graphics:400;400")
var p, r, col : int := 0
r := 400
col := 1
loop
    for i : 1 .. 400
        delay (1)
        p += 1
        r -= 1
        col += 2
        if col >= 255 then
            col := 1
        end if
        drawbox (p, p, r, r, col) %<-- Try putting star or oval here
        p += 1
        r -= 1
        drawbox (p, p, r, r, 33) %<-- Try putting star or oval here
    end for
end loop
Martin




PostPosted: Fri Feb 04, 2005 1:29 pm   Post subject: (No subject)

code:

% Pyramid by Travis Barker - ZB Edit
setscreen ("graphics:400;400")
var p, r : int := 0
r := 400
loop
    for i : 1 .. 400
        delay (1)
        drawbox (p+1, p+1, r-1, r-1, (2*i + 1) mod 255) %<-- Try putting star or oval here
        drawbox (p, p, r, r, 33) %<-- Try putting star or oval here
    end for
end loop


Even shorter. 11 lines
Sponsor
Sponsor
Sponsor
sponsor
TheZsterBunny




PostPosted: Fri Feb 04, 2005 11:33 pm   Post subject: (No subject)

/me bows in respect.


um...

code:

setscreen ("graphics:400;400") % Pyramid by Travis Barker - ZB Edit -MK Edit
var p, r : int := 0
r := 400
loop
    for i : 1 .. 400
        delay (1)
        drawbox (p+1, p+1, r-1, r-1, (2*i + 1) mod 255) %<-- Try putting star or oval here
        drawbox (p, p, r, r, 33) %<-- Try putting star or oval here
    end for
end loop

10 lines.

-Z
apomb




PostPosted: Sat Feb 05, 2005 6:26 pm   Post subject: (No subject)

Thinking seems that you both posted before you tried your code ... that code does not work. it only draws a blue outline Wink
josh




PostPosted: Sat Feb 05, 2005 11:24 pm   Post subject: (No subject)

I was wondering about that also.....
TheZsterBunny




PostPosted: Sun Feb 06, 2005 4:16 pm   Post subject: (No subject)

lol. i never tried it. correct.

Anyways;

code:

setscreen ("graphics:400;400") % Pyramid by Travis Barker - ZB Edit
for i : 1 .. 400 by 2
    delay (1)
    drawbox (i, i, 400 - i, 400 - i, (i - 1) mod 256)     %<-- Try putting star or oval here
    drawbox (i + 1, i + 1, 400 - (i + 1), 400 - (i + 1), 33)     %<-- Try putting star or oval here
end for

6 lines, same effect, same numbers.

Beat that martin.

-Z
Tony




PostPosted: Fri Feb 11, 2005 10:41 pm   Post subject: (No subject)

John offered an interesting challange of drawing a checkerboard..
Turing:

View.Set ("graphics:500;500")
for i : 0 .. 109
    Draw.FillBox (i * 50 mod 550, floor (i / 11) * 50, i * 50 mod 550 + 50, floor (i / 11) * 50 + 50, i mod 2 * black)
end for

Posting this up here just for future references
zylum




PostPosted: Sat Feb 12, 2005 1:35 pm   Post subject: (No subject)

you could always do it with a single line using fillpolygon Laughing but then again you wouldnt be able to control dimensions easily
apomb




PostPosted: Wed Feb 16, 2005 11:30 pm   Post subject: (No subject)

just change the "Box" to "Mapleeaf" and "black" to "12" and you got yourself a nice patriotic bandana ... same effect if use "star" and "colorback (blue) \n cls" for our american friends Wink and by friends, i meant jackasses
Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 4 of 5  [ 62 Posts ]
Goto page Previous  1, 2, 3, 4, 5  Next
Jump to:   


Style:  
Search: