Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Psychedelia is back!
#1
Probably someone has had this idea before....
While trying to do something for Adigun's textmode 7liners contest, I found that the back/fore color of a char gives you two separate chanels where you can draw different plasmas. The char 177 is an uniform pattern of back and foreground pixels, so if you fill a screen of it you have a translucency effect without effort.

Here it is, without the constraint of the 7 lines:

Code:
' Translucent Textmode Plasma by Antoni Gual  September/2004
'
WIDTH , 50
CONST mo = 511
CONST fa = (mo + 1) / 2 / 3.141592
DO WHILE LEN(INKEY$): LOOP
DEF SEG = &HB800
PRINT STRING$(80 * 50, 177);  '176, 177,178
DIM A(mo), b(mo), c(mo), D(mo), e(mo)
FOR i% = 0 TO mo
   A(i%) = .31 * COS(i% * 4 / fa)
   b(i%) = .47 * COS(i% * 13 / fa)
   c(i%) = .41 * COS((i% + 21) * 7 / fa)
   D(i%) = 20 * COS(i% * 5 / fa)
   e(i%) = 8 * COS((i% + 31) * 1 / fa)
NEXT
DO
  f& = f& + 1
  k% = 50 * c(f& AND mo) + 51
  k1% = 240 * A((f& + 30) AND mo) + 241
  FOR i% = 0 TO 49
   i1% = i% * 160
   FOR j% = 1 TO 159 STEP 2
    fore% = 13.5 + b(k%) + A((j% - D(j%) + k1%) AND mo) + c((j% + D(i%) + e(k%)) AND mo)
    back% = 3.5 + c(k%) + c((j% + D(i%) - k%) AND mo) + c((e(k1%) + i% + f&) AND mo)
    POKE i1% + j%, 16 * back% + fore%
  NEXT j%, i%
LOOP UNTIL INP(&H60) = 1

Can someone point me to a good tutorial about plasmas? Big Grin
Antoni
Reply
#2
Check out Rel's site.....he has a plasma program, with commenting (@ least i think it was rel.....)

Oz~
Reply
#3
Woot!!! Antoni!!! Why haven't I thought of that. :*)

I have an article at QBTM but I cannot seem to access the site right now.
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#4
Pete's site has QBTM
http://www.petesqbsite.com/sections/zine...shtml#qbtm
Antoni
Reply
#5
I meant QBCM. ;*)

http://qbcm.hybd.net/issues/4-1/
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#6
Thanks!
Antoni
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)