Posted: Tue Mar 22, 2005 11:59 pm Post subject: Plasma
Has anyone posted anything like this before?
code:
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)
Sponsor Sponsor
zylum
Posted: Wed Mar 23, 2005 12:57 am Post subject: (No subject)
pretty slick + 50 bits
RaPsCaLLioN
Posted: Wed Mar 23, 2005 8:53 pm Post subject: (No subject)
Thx zylum. Guess nobody else cares. People would rather reply on 2 yr old threads
ssr
Posted: Wed Mar 23, 2005 9:17 pm Post subject: (No subject)
lol that is good
remind me of something ummm...
GlobeTrotter
Posted: Wed Mar 23, 2005 11:08 pm Post subject: (No subject)
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
Posted: Wed Mar 23, 2005 11:25 pm Post subject: (No subject)
very cool!
Mr. T
Posted: Thu Mar 24, 2005 1:31 am Post subject: (No subject)
good ol' fashion hippy psychadelic freak out
Tony
Posted: Thu Mar 24, 2005 9:27 am Post subject: (No subject)
defenatly better than random "omg, look at screen flash different colours" crap we've been getting lately. I like this one +25Bits
Sponsor Sponsor
Mazer
Posted: Thu Mar 24, 2005 9:35 am Post subject: (No subject)
RaPsCaLLioN wrote:
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
Posted: Thu Mar 24, 2005 2:10 pm Post subject: (No subject)
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
Posted: Fri Mar 25, 2005 2:44 pm Post subject: (No subject)
Thx for the comments guys - I'll post some variances of the sins when i get home tonight...
post8k
Posted: Fri Mar 25, 2005 5:05 pm Post subject: (No subject)
Nice program.... !!
i liked it...
RaPsCaLLioN
Posted: Sat Mar 26, 2005 9:57 am Post subject: (No subject)
Try this variation...
code:
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
Posted: Sat Mar 26, 2005 10:00 am Post subject: (No subject)
that one's much cooler than the first one, gj.
RaPsCaLLioN
Posted: Sat Mar 26, 2005 10:18 am Post subject: (No subject)
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.