
-----------------------------------
RaPsCaLLioN
Tue Mar 22, 2005 11:59 pm

Plasma
-----------------------------------
Has anyone posted anything like this before?

var iWindow : int := Window.Open ("offscreenonly, graphics:200;200, noecho, nocursor")

var iColour : int
var x, y : int
var rArb : real
var rTime : real

procedure ColourSet (R, G, B : int)
    % for i : 1 .. 64
    %     RGB.SetColor (i, R * i / 64, G * i / 64, B * i / 64)
    % end for
    % for i : 65 .. 128
    %     RGB.SetColor (128 + 65 - i, R * i / 64, G * i / 64, B * i / 64)
    % end for
    % for i : 129 .. 192
    %     RGB.SetColor (i, R * i / 64, G * i / 64, B * i / 64)
    % end for
    % for i : 193 .. 256
    %     RGB.SetColor (256 + 193 - i, R * i / 64, G * i / 64, B * i / 64)
    % end for
    for i : 129 .. 192
        RGB.SetColor (i, 0, 0, 1 + i / 64)
    end for
    for i : 193 .. 256
        RGB.SetColor (256 + 193 - i, 0, 1 + i / 64, 1)
    end for
    for i : 1 .. 64
        RGB.SetColor (i, 0, 1 + i / 64, 1 - i / 64)
    end for
    for i : 65 .. 128
        RGB.SetColor (128 + 65 - i, 0, 1 + i / 64, 0)
    end for
end ColourSet

ColourSet (1, 0, 0)

loop
    rTime := Time.Elapsed /75
    for i : 1 .. maxx by 2
        for j : 1 .. maxy by 2
            rArb := sin (Math.Distance (i + rTime, j, 128.0, 128.0) / 8.0)
                + sin (Math.Distance (i, j, 64.0, 64.0) / 8.0)
                + sin (Math.Distance (i, j + rTime / 7, 192.0, 64) / 7.0)
                + sin (Math.Distance (i, j, 192.0, 100.0) / 8.0)
            iColour := round ((4 + rArb)) * 32
            % iColour := round (128.0 + (128.0 * sin (sqrt ((i - maxx / 2.0) * (i - maxx / 2.0) + (j - maxy / 2.0) * (j - maxy / 2.0)) / 8.0)))
            if iColour < 2 or iColour > 256 then
                iColour := 2
            end if
            drawfillbox (i, j, i + 1, j + 1, iColour - 1)
        end for
    end for
    Window.Update (iWindow)
    exit when buttonmoved ("down")
end loop

Window.Close (iWindow)

-----------------------------------
zylum
Wed Mar 23, 2005 12:57 am


-----------------------------------
pretty slick ;) + 50 bits

-----------------------------------
RaPsCaLLioN
Wed Mar 23, 2005 8:53 pm


-----------------------------------
Thx zylum.  Guess nobody else cares.  People would rather reply on 2 yr old threads :(

-----------------------------------
ssr
Wed Mar 23, 2005 9:17 pm


-----------------------------------
lol that is good
remind me of something ummm...

-----------------------------------
GlobeTrotter
Wed Mar 23, 2005 11:08 pm


-----------------------------------
How do you figure these things out?  Is it just a bunch of guess and check, putting some trig statements and seeing what you get?  It's really crazy good.

-----------------------------------
Naveg
Wed Mar 23, 2005 11:25 pm


-----------------------------------
very cool!

-----------------------------------
Mr. T
Thu Mar 24, 2005 1:31 am


-----------------------------------
good ol' fashion hippy psychadelic freak out

-----------------------------------
Tony
Thu Mar 24, 2005 9:27 am


-----------------------------------
defenatly better than random "omg, look at screen flash different colours" crap we've been getting lately. I like this one :)
+25Bits

-----------------------------------
Mazer
Thu Mar 24, 2005 9:35 am


-----------------------------------
Thx zylum.  Guess nobody else cares.  People would rather reply on 2 yr old threads :(
You know damn right we would. Now where the hell did that matrix thread go...

Just kidding. Good shit, rapscallion.

-----------------------------------
Token
Thu Mar 24, 2005 2:10 pm


-----------------------------------
wow this is really cool, i like how they melt together and stuff, lol pwned is right, it reminds me of those hippy things off that 70's show, keep it up man

-----------------------------------
RaPsCaLLioN
Fri Mar 25, 2005 2:44 pm


-----------------------------------
Thx for the comments guys - I'll post some variances of the sins when i get home tonight...

-----------------------------------
post8k
Fri Mar 25, 2005 5:05 pm


-----------------------------------
Nice program.... !!
i liked it...

-----------------------------------
RaPsCaLLioN
Sat Mar 26, 2005 9:57 am


-----------------------------------
Try this variation...

var iWindow : int := Window.Open ("offscreenonly, graphics:200;200, noecho, nocursor")

var iColour : int
var x, y : int
var rArb : real
var rTime : real
var iRes : int := 2
var sChar : string (1)

procedure ColourSet (R, G, B : int)
    for i : 1 .. 128
        RGB.SetColor (i, 1 + i / 128, .5, .5)
    end for
    for i : 129 .. 256
        RGB.SetColor (256 + 129 - i, 1 + i / 128, .5, .5)
    end for
end ColourSet

ColourSet (1, 0, 0)

loop
    rTime := Time.Elapsed / 100
    for i : 1 .. maxx by iRes
        for j : 1 .. maxy by iRes
            rArb := sin (Math.Distance (i + rTime, j, 128.0, 128.0) / 8.0)
                + sin (Math.Distance (i, j, 64.0, 64.0) / 8.0)
                + sin (Math.Distance (i, j + rTime / 7, 192.0, 64) / 7.0)
                + sin (Math.Distance (i, j, 192.0, 100.0) / 8.0)
            iColour := round (64 + 63 * sin (i / (37 + 15 * cos (j / 74))) * cos (j / (31 + 11 * sin (i / 57))) * +rArb)
            if iColour < 2 or iColour > 256 then
                iColour := 2
            end if
            drawfillbox (i, j, i + iRes - 1, j + iRes - 1, iColour - 1)
        end for
    end for
    if hasch then
        getch (sChar)
        if ord (sChar) = 200 then
            if iRes < 8 then
                iRes += 2
            end if
        elsif ord (sChar) = 208 then
            if iRes > 2 then
                iRes -= 2
            end if
        end if
    end if
    Window.Update (iWindow)
    exit when buttonmoved ("down")
end loop

Window.Close (iWindow)

-----------------------------------
jamonathin
Sat Mar 26, 2005 10:00 am


-----------------------------------
that one's much cooler than the first one, gj.

-----------------------------------
RaPsCaLLioN
Sat Mar 26, 2005 10:18 am


-----------------------------------
I just made an EDIT to that last post.  I included a resolution switch.  Use UP/DOWN to change resolution.  This could also help if you want to increase screen size.

-----------------------------------
zylum
Sat Mar 26, 2005 1:17 pm


-----------------------------------
much better! another 20 bits awarded!

-----------------------------------
AsianSensation
Sat Mar 26, 2005 8:45 pm


-----------------------------------
I think I'll top that by giving double.

+40 bits.

Hell, + another 20 bits just because I like it.

Like tony said, definitely better than the "ZOMG! It's flashing!!" programs that we've been getting.

-----------------------------------
zylum
Sun Mar 27, 2005 12:02 am


-----------------------------------
lol, i gave 70 total (read my previous post) and you only gave 60... i guess i win  :wink:

-----------------------------------
RaPsCaLLioN
Sun Mar 27, 2005 12:41 am


-----------------------------------
lol
Nice to know ppl are fighting over who gives me the most bits  :D

Has anyone else played with the code and made anything of it themselves?

-----------------------------------
AsianSensation
Sun Mar 27, 2005 1:16 am


-----------------------------------
lol, i gave 70 total (read my previous post) and you only gave 60... i guess i win  :wink:

oooooo, so that's how it's going to be. :D lol.

well, check and match. 

+10 bits.

-----------------------------------
Mr. T
Sun Mar 27, 2005 11:14 pm


-----------------------------------
its 70 - 70 now

and if you had won the battle, you would have said "checkmate," not "check." LOL

-----------------------------------
Mr. T
Sun Mar 27, 2005 11:19 pm


-----------------------------------
Check out this uber edit! (adjust the resolution for psychadellic squares)
It's uber! 
and
It's an edit!
You cant lose!
-------------------
var iWindow : int := Window.Open ("offscreenonly, graphics:200;200, noecho, nocursor") 

var iColour : int 
var x, y : int 
var rArb : real 
var rTime : real 
var iRes : int := 2 
var sChar : string (1) 

procedure ColourSet (R, G, B : int) 
    for i : 1 .. 128 
        RGB.SetColor (9, 1 + 9 / 128, .5, .5) 
    end for 
    for i : 129 .. 256 
        RGB.SetColor (256 + 129 -  9, 1 + 9 / 128, .5, .5) 
    end for 
end ColourSet 

ColourSet (1, 0, 0) 

loop 
    rTime := Time.Elapsed / 100 
    for i : 1 .. maxx by iRes 
        for j : 1 .. maxy by iRes 
            rArb := sin (Math.Distance (i + rTime, j, 128.0, 128.0) / 8.0) 
                + sin (Math.Distance (0, j, 64.0, 64.0) / 8.0) 
                + sin (Math.Distance (i, j + rTime / 7, 192.0, 64) / 7.0) 
                + sin (Math.Distance (i, j, 192.0, 100.0) / 8.0) 
            iColour := round (64 + 63 * sin (i / (37 + 15 * cos (j / 74))) * cos (j / (31 + 11 * sin (i / 57))) * +rArb) 
            if iColour < 2 or iColour > 256 then 
                iColour := 2 
            end if 
            drawfillbox (i, j, i + iRes - 1, j + iRes - 1, iColour - 1) 
        end for 
    end for 
    if hasch then 
        getch (sChar) 
        if ord (sChar) = 200 then 
            if iRes < 8 then 
                iRes += 2 
            end if 
        elsif ord (sChar) = 208 then 
            if iRes > 2 then 
                iRes -= 2 
            end if 
        end if 
    end if 
    Window.Update (iWindow) 
    exit when buttonmoved ("down") 
end loop 

Window.Close (iWindow)


-----------------------------------
Naveg
Sun Mar 27, 2005 11:31 pm


-----------------------------------
all you did was change the colours no?

-----------------------------------
Mr. T
Sun Mar 27, 2005 11:32 pm


-----------------------------------
see for yourself.

-----------------------------------
Naveg
Sun Mar 27, 2005 11:34 pm


-----------------------------------
i did, and it looks like all you did was change the colours

what do you mean by squares and changing resolution?

-----------------------------------
Mr. T
Sun Mar 27, 2005 11:35 pm


-----------------------------------
but it on the worst possible resolution, and it has those flashy squares.
reminds of the old snes super mario. when u laoded into a level, those blurry little squares were used as intro. :)

-----------------------------------
RaPsCaLLioN
Sun Mar 27, 2005 11:44 pm


-----------------------------------
i did, and it looks like all you did was change the colours

what do you mean by squares and changing resolution?

i changed it so u can decrease/increase the resolution using the up/down arrow keys...

and Pwned.....  i don't understand how ppl find flashing squares amusing.  Ur like a moth to a porch light.  Ur mis-using my code and I won't stand for that! :D

-----------------------------------
Mr. T
Sun Mar 27, 2005 11:50 pm


-----------------------------------
ya, sorry, i took the sophistication out of it

-----------------------------------
Spartan_117
Sun May 29, 2005 5:03 pm


-----------------------------------
it says Distance is not in export list of Math

-----------------------------------
Mr. T
Sun May 29, 2005 5:59 pm

Alex's Opinion
-----------------------------------
You're probably using an older version of Turing.  :wink:
