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

Username:   Password: 
 RegisterRegister   
 Cool Trippy Effect
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
s_climax




PostPosted: Sun Apr 25, 2004 7:28 pm   Post subject: Cool Trippy Effect

code:
setscreen ("graphics:512;512")
var col, bbb, ccc, ttt, font, zzz, xxx : int
var cc, tt : int
col := 0
ttt := 1
ccc := 256
bbb := 1
zzz := 0
xxx := 0
tt := 0
cc := 0


loop
    delay (10)

    loop
        delay (10)
        bbb := bbb + 1
        if zzz = 255 then
            xxx := 1
        elsif zzz = 1 then
            xxx := 0
        end if

        col := col + 1

        if xxx = 0 then
            zzz := zzz + 1
            ccc := ccc + 1
            ttt := ttt - 1
        elsif xxx = 1 then
            cc := ccc div 2
            tt := ttt div 2
            zzz := zzz - 1
            ttt := ttt + 2
            ccc := ccc - 2
        end if


        cc := ccc div 2
        tt := ttt div 2

        if col = 1023 then
            drawfilloval (256, 256, 256, 256, 55)
        end if


        drawoval (256, 256, ttt, ttt, 255)
        drawfilloval (256, 256, ccc, ttt, zzz)
        drawfilloval (256, 256, ttt, ccc, zzz)
        exit when col = 1280 or hasch

    end loop
    col := 0
    ttt := 1
    ccc := 256
    bbb := 1
    zzz := 0
    xxx := 0
    tt := 0
    cc := 0
    exit when hasch
end loop

Sponsor
Sponsor
Sponsor
sponsor
gamer




PostPosted: Sun Apr 25, 2004 9:08 pm   Post subject: (No subject)

true pretty cool, yet simple codes
s_climax




PostPosted: Mon Apr 26, 2004 5:32 pm   Post subject: (No subject)

What's most impressive with this program is that it was one of the first things I made with turing.
s_climax




PostPosted: Sun May 02, 2004 8:43 pm   Post subject: (No subject)

Here are three I made while experimenting with sin/cos. I think the 1st is my best.

code:

setscreen ("graphics:200,200")
var timer, x1, y1, x2, y2, r : int
var pi : real
r := maxx div 2
timer := 0
pi := 3.1415926535897932384626433832795
%drawfilloval (maxx div 2, maxy div 2, maxx div 2, maxy div 2, 7)
for i : 25 .. 25500 by 1
    timer += 1
    x1 := round (r * (sin (timer)))
    y1 := round (r * (cos (timer)))
    x2 := round (r * (sin (timer * pi)))
    y2 := round (r * (cos (timer * pi)))
    drawline ((x1 + r), y1 + r, (x2 + r), y2 + r, i div 100)
    drawline ((y1 + r), x1 + r, (y2 + r), x2 + r, i div 100)
    delay (1)
    exit when hasch
end for




code:

setscreen ("graphics:400,400")
var i, x1, x2, y1, y2, r : int
var pi : real
pi := 3.1415926535897932384626433832795
r := -1 * (maxcol * 21)
i := -1 * (maxcol * 21)
loop
    i += 1
    r += 1
    x1 := abs (round (r * sin (i * pi)))
    y1 := abs (round (r * cos (i * pi)))
    x2 := abs (round (r * sin (i * pi + 1)))
    y2 := abs (round (r * cos (i * pi + 1)))
    drawline (x1, y1, x2, y2, abs (i div 21))
    drawline (maxx - x1, maxy - y1, maxx - x2, maxy - y2, abs (i div 21))
    drawline (maxx - x1, y1, maxx - x2, y2, abs (i div 21))
    drawline (x1, maxy - y1, x2, maxy - y2, abs (i div 21))
    delay (1)
    exit when i > (maxcol * 10)
end loop



code:

setscreen ("graphics:400,400")
var i, x1, x2, y1, y2, r : int
var pi : real
pi := 3.1415926535897932384626433832795
r := -1 * (maxcol * 21)
i := -1 * (maxcol * 21)
loop
    i += 1
    r += 1
    x1 := abs (round (r * sin (i / pi)))
    y1 := abs (round (r * cos (i / pi)))
    x2 := abs (round (r * sin (i / (pi + 1))))
    y2 := abs (round (r * cos (i / (pi + 1))))
    drawline (x1, y1, x2, y2, abs (i div 21))
    drawline (maxx - x1, maxy - y1, maxx - x2, maxy - y2, abs (i div 21))
    drawline (maxx - x1, y1, maxx - x2, y2, abs (i div 21))
    drawline (x1, maxy - y1, x2, maxy - y2, abs (i div 21))
    delay (1)
    exit when i > (maxcol * 10)
end loop
the_short1




PostPosted: Tue May 04, 2004 6:04 pm   Post subject: (No subject)

setscreen ("graphics:500,500")

LOOKZ WAY BETTER for the first one using sine..


OMFG!!! ththat is SOOOO fucking GOOD!!!!! lookz SO DAM GOOD!!!

here is 10 BITS !!!!!!!!!!


all three look nice...
first one is AMAZING....

crazy ass shit....

im definately impressed... keep up the good work and keep on posting on compsci Smile


btw.... can i add those 3 into my compilation of cool turing visuals (its a huge zip file with tons of them from tons of ppl???) ** i have this on my site and my DL manager...
s_climax




PostPosted: Tue May 04, 2004 6:09 pm   Post subject: (No subject)

Use them all you want. They were easy to make. I didn't even have to understand sin/cos to make them.

By the way, if you are going to make the screen bigger, it looks better to change it to this.

code:

setscreen ("graphics:500,500")
var timer, x1, y1, x2, y2, r : int
var pi : real
r := maxx div 2
timer := 0
pi := 3.1415926535897932384626433832795
drawfilloval (maxx div 2, maxy div 2, maxx div 2, maxy div 2, 7)
for i : 25 .. 25500 by 1
    timer += 1
    x1 := round (r * (sin (timer)))
    y1 := round (r * (cos (timer)))
    x2 := round (r * (sin (timer * pi)))
    y2 := round (r * (cos (timer * pi)))
    Draw.ThickLine ((x1 + r), y1 + r, (x2 + r), y2 + r, 5, i div 100)
    Draw.ThickLine ((y1 + r), x1 + r, (y2 + r), x2 + r, 5, i div 100)
    delay (1)
    exit when hasch
end for
Paul




PostPosted: Tue May 04, 2004 7:01 pm   Post subject: (No subject)

that induces siezures, but while ur at it, make it more accurate by using this line of code
code:

pi:=3.141592653589793238462643383279502884
197169399375105820974944592307816406286208
998628034825342117067982148086513282306647093
844609550582231725359408128

Laughing
Mazer




PostPosted: Tue May 04, 2004 7:10 pm   Post subject: (No subject)

Paul Bian wrote:
that induces siezures, but while ur at it, make it more accurate by using this line of code
code:

pi:=3.141592653589793238462643383279502884
197169399375105820974944592307816406286208
998628034825342117067982148086513282306647093
844609550582231725359408128

Laughing

No you can't. Float's only hold 6 digits after the radix, and with turing it would actually round it to 3.141593. Confused
Sponsor
Sponsor
Sponsor
sponsor
the_short1




PostPosted: Tue May 04, 2004 7:21 pm   Post subject: (No subject)

... yea... doesn;t need to get taht acurate anyways... !!!



that is exactly how i had it s_climax... setscreen 500;500.
Flashkicks




PostPosted: Wed May 05, 2004 10:02 am   Post subject: (No subject)

If ya'll want the first couple hundred digits of Pi---Just ask Delta Laughing Rolling Eyes Laughing Shocked .. Too much time on that poor boys hands.... Confused
Mazer




PostPosted: Wed May 05, 2004 8:23 pm   Post subject: (No subject)

I've got the first 10 000 digits (on paper), and about ~80 in my head. But more to the point:
code:

ttt := 1
ccc := 256
bbb := 1
zzz := 0
xxx := 0
tt := 0
cc := 0

Omni, you don't still use variable names that way do you?
s_climax




PostPosted: Wed May 05, 2004 8:56 pm   Post subject: (No subject)

Who's Omni?

If you are directing the question to me, the answer is no.
Mazer




PostPosted: Wed May 05, 2004 9:07 pm   Post subject: (No subject)

Holy crap! This is why I never talk...

yeah, I was referring to you. Sorry if I offended anyone or something.
Flashkicks




PostPosted: Thu May 06, 2004 7:20 pm   Post subject: (No subject)

Mazer--Delta has a lor more than that Rolling Eyes Shocked Rolling Eyes Shocked ..LMBO!!... Hes SUCH A DRUNK!!..lol... Anyhoo.. Yeah..Good luck with the whole thingy and getting success and COOL TRIPPY EFFECTS!.
the_short1




PostPosted: Thu May 06, 2004 9:56 pm   Post subject: (No subject)

yea tripple letters are kinda redunddant... <<think i spelled that rite... not sure tho...


anyways.....
due to ur 3 kick ass progies... i think i mite reupdate my visuals.zip tomorow... now that i have like 15 nes ones for it..
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 20 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: