Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > plasma ?? what is it
2008-06-22 08:33
turtle
Account closed

Registered: Mar 2005
Posts: 44
plasma ?? what is it

someone who can explain what plasma is? certainly many who wonder what it is =)

is it real time ?

or

2008-06-22 09:17
hollowman

Registered: Dec 2001
Posts: 474
From ANuBiS DeMo TUtORS
//---------------------------------
// Plasmas Stuff
//---------------------------------

void Do_Plasma(void)
{
 v=0;
 waitretrace();
 t1=p1;
 t2=p2;
 for (y=0;y<50;y++)
 {
  t3=p3;
  t4=p4;
  for (x=0;x<80;x++)
  {
   col=cosinus[t1]+cosinus[t2]+cosinus[t3]+cosinus[t4];
   videomem[v]=col;
   v++;
   t3+=1;
   t4+=3;
  }
 t1+=2;
 t2+=1;
 }
 p1+=1;
 p2-=2;
 p3+=3;
 p4-=4;
}

void Prep_Pal(void)
{
 int i;
 for (x=0,y=0;x<63*3;x+=3,y++) pal[x]=y;
 for (x=63*3,y=63;x<127*3;x+=3,y--) pal[x]=y;
 for (x=127*3,y=0;x<191*3;x+=3,y++) pal[x+1]=y;
 for (x=191*3,y=191;x<255*3;x+=3,y--) pal[x+1]=y;
}

void Pre_Calc(void)
{
 int i;
 for (i=0;i<256;i++)
  cosinus[i]=30*(cos(i*PI/64));
}

This is pretty much what you need to know to make a 8x8 plasma on c64. Like in the example you create a lookup table with cosinus values, instead of the palette you make a charset with a gradient that loops, so that you can output the added cosinus values directly to the screen
The charset could look something like this, but preferrably prettier
2008-06-22 09:24
Stryyker

Registered: Dec 2001
Posts: 468
What defines it as a plasma?
2008-06-22 15:53
Martin Piper

Registered: Nov 2007
Posts: 722
The wibbly-wobbly colour effect on the screen that looks like oil on water, or flames etc.
2008-06-22 16:07
Graham
Account closed

Registered: Dec 2002
Posts: 990
"Plasma" is usually considered the 4th state of molecules, where atom cores and electrons have no binding anymore.
2008-06-22 16:24
Martin Piper

Registered: Nov 2007
Posts: 722
It's what the Enterprise uses for power transfer. ;)
2008-06-22 16:54
turtle
Account closed

Registered: Mar 2005
Posts: 44
someone who has a rutine for plasma ?

2008-06-22 17:10
hollowman

Registered: Dec 2001
Posts: 474
Quote: someone who has a rutine for plasma ?



I already posted that. But if you dont want to code yourself, and since I had one lying around anyway:

         *= $1000
s1       = $fa
s2       = $fb
s3       = $fc
s4       = $fd

screen   = $0400

         sei
         lda #$18
         sta $d018

lp3

         lda s3
         sta s1
         lda s4
         sta s2

         lda s7+1
         clc
         adc #3
         sta s7+1
         lda s8+1
         clc
         adc #5
         sta s8+1
s7
         lda #$00
         sta s5+1
s8
         lda #$00
         sta s6+1

         lda #<screen
         sta scp+1
         lda #>screen
         sta scp+2
lp2

         lda s1
         sta lp1+1
         lda s2
         sta spp+1

s5
         ldx #$00
         lda sinus,x
s6
         ldy #$00
         adc sinus,y
         sta lp1a+1

         ldy #$00
lp1a
         lda #$00
lp1
         adc sinus
spp
         adc sinus
scp
         sta screen,y
         lda spp+1
         adc #1
         sta spp+1
         lda lp1+1
         adc #3
         sta lp1+1
         iny
         cpy #40
         bne lp1a

         lda s5+1
         clc
         adc #5
         sta s5+1
         lda s6+1
         clc
         adc #7
         sta s6+1

         lda s1
         clc
         adc #1
         sta s1
         lda s2
         clc
         adc #3
         sta s2

         lda scp+1
         clc
         adc #40
         sta scp+1
         lda scp+2
         adc #$00
         sta scp+2
         dec lcnt+1
lcnt
         lda #25
         bne lp2
         lda #25
         sta lcnt+1

         lda s3
         clc
         adc #1
         sta s3
         lda s4
         sec
         sbc #3
         sta s4
         jmp lp3



         *= $1f00
sinus
         .byte $20,$20,$21,$22,$23,$23
         .byte $24,$25,$26,$27,$27,$28
         .byte $29,$2a,$2a,$2b,$2c,$2c
         .byte $2d,$2e,$2f,$2f,$30,$31
         .byte $31,$32,$33,$33,$34,$34
         .byte $35,$36,$36,$37,$37,$38
         .byte $38,$39,$39,$3a,$3a,$3b
         .byte $3b,$3b,$3c,$3c,$3c,$3d
         .byte $3d,$3d,$3e,$3e,$3e,$3e
         .byte $3f,$3f,$3f,$3f,$3f,$3f
         .byte $3f,$3f,$3f,$3f,$3f,$3f
         .byte $3f,$3f,$3f,$3f,$3f,$3f
         .byte $3f,$3f,$3f,$3e,$3e,$3e
         .byte $3e,$3d,$3d,$3d,$3c,$3c
         .byte $3c,$3b,$3b,$3b,$3a,$3a
         .byte $39,$39,$38,$38,$37,$37
         .byte $36,$36,$35,$34,$34,$33
         .byte $33,$32,$31,$31,$30,$2f
         .byte $2f,$2e,$2d,$2c,$2c,$2b
         .byte $2a,$2a,$29,$28,$27,$27
         .byte $26,$25,$24,$23,$23,$22
         .byte $21,$20,$20,$1f,$1e,$1d
         .byte $1c,$1c,$1b,$1a,$19,$18
         .byte $18,$17,$16,$15,$15,$14
         .byte $13,$13,$12,$11,$10,$10
         .byte $0f,$0e,$0e,$0d,$0c,$0c
         .byte $0b,$0b,$0a,$09,$09,$08
         .byte $08,$07,$07,$06,$06,$05
         .byte $05,$04,$04,$04,$03,$03
         .byte $03,$02,$02,$02,$01,$01
         .byte $01,$01,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$01
         .byte $01,$01,$01,$02,$02,$02
         .byte $03,$03,$03,$04,$04,$04
         .byte $05,$05,$06,$06,$07,$07
         .byte $08,$08,$09,$09,$0a,$0b
         .byte $0b,$0c,$0c,$0d,$0e,$0e
         .byte $0f,$10,$10,$11,$12,$13
         .byte $13,$14,$15,$15,$16,$17
         .byte $18,$18,$19,$1a,$1b,$1c
         .byte $1c,$1d,$1e,$1f


         *= $2000
chars

         .byte $00,$00,$00,$00,$00,$00
         .byte $00,$00,$88,$00,$00,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $aa,$00,$22,$00,$aa,$00
         .byte $22,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $88,$00,$22,$00,$88,$00
         .byte $22,$00,$88,$00,$00,$00
         .byte $88,$00,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $00,$00,$88,$00,$22,$00
         .byte $88,$00,$22,$00,$aa,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$22,$00
         .byte $aa,$00,$22,$00,$88,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$88,$00
         .byte $00,$00,$88,$00,$00,$00
         .byte $88,$00,$22,$00,$88,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $aa,$00,$22,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$ee,$55
         .byte $bb,$55,$ee,$55,$bb,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$55,$ff,$dd,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$11,$aa,$55,$aa,$11
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$22,$00,$aa,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $88,$00,$22,$00,$88,$00
         .byte $00,$00,$88,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $00,$00,$88,$00,$00,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $aa,$00,$22,$00,$aa,$00
         .byte $22,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $88,$00,$22,$00,$88,$00
         .byte $22,$00,$88,$00,$00,$00
         .byte $88,$00,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $00,$00,$88,$00,$22,$00
         .byte $88,$00,$22,$00,$aa,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$22,$00
         .byte $aa,$00,$22,$00,$88,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$88,$00
         .byte $00,$00,$88,$00,$00,$00
         .byte $88,$00,$22,$00,$88,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $aa,$00,$22,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$ee,$55
         .byte $bb,$55,$ee,$55,$bb,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$55,$ff,$dd,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$11,$aa,$55,$aa,$11
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$22,$00,$aa,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $88,$00,$22,$00,$88,$00
         .byte $00,$00,$88,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $00,$00,$88,$00,$00,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $aa,$00,$22,$00,$aa,$00
         .byte $22,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $bb,$55,$ee,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $88,$00,$22,$00,$88,$00
         .byte $22,$00,$88,$00,$00,$00
         .byte $88,$00,$00,$00,$00,$00
         .byte $00,$00,$00,$00,$00,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $00,$00,$88,$00,$22,$00
         .byte $88,$00,$22,$00,$aa,$00
         .byte $22,$00,$aa,$00,$22,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$44,$aa,$00,$aa,$44
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$ee,$55
         .byte $aa,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ff,$55,$bb,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$77,$ff,$dd
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$ff,$ff,$ff,$ff,$ff
         .byte $ff,$ff,$ff,$dd,$ff,$ff
         .byte $ff,$dd,$ff,$ff,$ff,$dd
         .byte $ff,$77,$ff,$dd,$ff,$77
         .byte $ff,$dd,$ff,$55,$ff,$dd
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $ff,$55,$ff,$55,$ff,$55
         .byte $bb,$55,$ff,$55,$bb,$55
         .byte $ee,$55,$bb,$55,$ee,$55
         .byte $bb,$55,$ee,$55,$aa,$55
         .byte $ee,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$55,$aa,$55
         .byte $aa,$55,$aa,$11,$aa,$55
         .byte $aa,$11,$aa,$44,$aa,$11
         .byte $aa,$44,$aa,$11,$aa,$44
         .byte $aa,$00,$aa,$44,$aa,$00
         .byte $aa,$00,$aa,$00,$aa,$00
         .byte $aa,$00,$aa,$00,$22,$00
         .byte $aa,$00,$22,$00,$88,$00
         .byte $22,$00,$88,$00,$22,$00
         .byte $88,$00,$00,$00,$88,$00
         .byte $00,$00

2008-06-22 19:21
HCL

Registered: Feb 2003
Posts: 728
The definition of plasma is: Very cool colors moving in beautiful ways that can not be predicted. It's a very clear definition, you can just go on and implement it.
2008-06-22 20:10
TDJ

Registered: Dec 2001
Posts: 1879
Quote: The definition of plasma is: Very cool colors moving in beautiful ways that can not be predicted. It's a very clear definition, you can just go on and implement it.

Hell, one can even use rasterbars to implement your definition ;)
2008-06-22 20:24
iAN CooG

Registered: May 2002
Posts: 3197
Quote: Hell, one can even use rasterbars to implement your definition ;)

Rastersplit plasma are cool indeed
2008-06-22 20:28
Mace

Registered: May 2002
Posts: 1799
AFAIK, plasma is the effect where colour transistions are plotted on the screen in various interfering more or less repeating patterns.
2008-06-23 10:26
chatGPZ

Registered: Dec 2001
Posts: 11386
grahams definition is kinda best :) the "plasma" demo effect is kindof a visualation of the molecular density in a certain medium (which happens to be in plasma state).

another famous visualisation is the so called "lava lamp" =)

(that definition excludes the so called double-sinus plasma routines - these dont visualise a chaotic plasma state, but a simple cyclic pattern. BORING! =P)
2008-06-23 11:40
Graham
Account closed

Registered: Dec 2002
Posts: 990
It ain't my own definition: Plasma

:D
2008-06-23 11:46
HCL

Registered: Feb 2003
Posts: 728
Quote: It ain't my own definition: Plasma

:D


Oh man, that plasma lamp is probably the coolest thing on earth!!
2008-06-23 12:17
Oswald

Registered: Apr 2002
Posts: 5094
Quote: grahams definition is kinda best :) the "plasma" demo effect is kindof a visualation of the molecular density in a certain medium (which happens to be in plasma state).

another famous visualisation is the so called "lava lamp" =)

(that definition excludes the so called double-sinus plasma routines - these dont visualise a chaotic plasma state, but a simple cyclic pattern. BORING! =P)


that definition excludes everything we call a plasma regarding demos.
2008-06-23 12:42
chatGPZ

Registered: Dec 2001
Posts: 11386
not at all. a perlin noise plasma for example is pretty close. even with simple sinus functions you can make something that atleast looks very convincing (you'll certainly need more than two though =P).
2008-06-23 13:17
Graham
Account closed

Registered: Dec 2002
Posts: 990
Yeps, in fact even JPEG images are just many small 8x8 pixel sinus plasmas :D
2008-06-23 13:47
Mace

Registered: May 2002
Posts: 1799
For the Dutch plasma could also be a pissing mother...
*sigh*
2008-06-23 14:00
Oswald

Registered: Apr 2002
Posts: 5094
Quote: not at all. a perlin noise plasma for example is pretty close. even with simple sinus functions you can make something that atleast looks very convincing (you'll certainly need more than two though =P).

to begin with plasma is a state of matter (ionised gas) where atoms and electrons become (partly) separated. there's no molecular plasma what you blabble about, thus there's no fx that - even by mistake- can look "kindof" the same.
2008-06-23 14:05
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:

to begin with plasma is a state of matter (ionised gas) where atoms and electrons become (partly) separated.

... which results in constant fluctation of molecular density, similar to fluid dynamics ...

Quote:

thus there's no fx that - even by mistake- can look "kindof" the same.

... which depending on visualisation method, pretty much equals different type of plasmas.

another famous example are various effects achived by the marching cubes technique - which does no more than visualising the density of "matter".
2008-06-23 14:10
Oswald

Registered: Apr 2002
Posts: 5094
in a plasma state molecules does not exist, thus you dont have molecular density either.

do your homework.
2008-06-23 14:26
chatGPZ

Registered: Dec 2001
Posts: 11386
yes please, lets get into nitpicking again. mind you, we aren't doing a physics lesson here, and noone gives a shit wether a plasma visualises the gravitational force between atoms or electrons, the space between them, their speed or spin or whatever else (all of which is somewhat related to density of "matter").

but infact, to make you happy - you'd also get a similar visual effect by visualising the above said for actual molecules, it doesn't need anything like a real "plasma". (any more or less "chaotic" system would do the trick)
2008-06-23 15:32
Oswald

Registered: Apr 2002
Posts: 5094
sorry, but I dont fall for buzzwords and I do also hate them. (multimedia/plug n play anyone?:) for me plasmas are what they are:just adding up sines, or interpolating in 2d, or waving a color wash, etc to achieve a colorful eyecandy.
2008-06-23 18:20
Martin Piper

Registered: Nov 2007
Posts: 722
Why don't you just ban oswald for being repeatedly disruptive?
2008-06-23 18:29
enthusi

Registered: May 2004
Posts: 677
Quote: sorry, but I dont fall for buzzwords and I do also hate them. (multimedia/plug n play anyone?:) for me plasmas are what they are:just adding up sines, or interpolating in 2d, or waving a color wash, etc to achieve a colorful eyecandy.

No offense Oswald, but exactly that might have been an appropiate answer to the initial question itself, no?
2008-06-24 07:35
Monte Carlos

Registered: Jun 2004
Posts: 359
http://en.wikipedia.org/wiki/Plasma_effect
2008-06-25 07:43
Luca

Registered: Apr 2002
Posts: 178
@hollowman: ah very useful 32 chars dithering set, do you have a 64 chars deep one too?
2008-06-25 09:38
Graham
Account closed

Registered: Dec 2002
Posts: 990
Just build yourself an own ordered dither matrix with 6 instead of 5 bits. Basically you only need to build up a 2x2 matrix and use it recursively adding the values together while you leftshift them.

Example:

2x2 matrix would be:

0 2
3 1

Step 1 of 4x4 recursion would be:

0 0 2 2
0 0 2 2
3 3 1 1
3 3 1 1

Step 2 would be:

0 2 0 2
3 1 3 1
0 2 0 2
3 1 3 1

Now add matrix A with matrix B*4:

0 8 2 A
C 4 E 6
3 B 1 9
F 7 D 5

Now for each char 0...F you do a compare:

CharPixel[c,x,y] = (Matrix[x,y] <= c)
2008-06-25 11:31
Luca

Registered: Apr 2002
Posts: 178
@Graham: errr... :o Your elucidation has been quite interesting. Nonetheless, and with a bit of shame, have to admit I've appreciated Hollowman's cooked-to-be-eaten charset, and I was ready to show to the whole world all my lazyness, when I asked for the same but double deeper (64). :)
2008-06-25 11:44
Cruzer

Registered: Dec 2001
Posts: 1048
As far as I know, the term plasma started on Amiga, when someone figured out how to first split rasterbars (or as they were known on Amiga, copperbars) and then tech-tech them too. Example

The word has later been used for all kinds of effects with colors moving in sine patterns, and the original Amiga way of making plasma is now known as copperplasma.

2008-06-25 13:49
HCL

Registered: Feb 2003
Posts: 728
Real artistery starts at painting your own dithered color-depth charset.
2008-06-25 14:13
Luca

Registered: Apr 2002
Posts: 178
Fake artistry ends at asking on forums. :) I'm not so much into "He-man and the Masters of the Dithering" style.
Oh, HCL, of course you're right anyway.
2008-06-25 14:33
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:

As far as I know, the term plasma started on Amiga, when someone figured out how to first split rasterbars (or as they were known on Amiga, copperbars) and then tech-tech them too.


mmmh. i'm not sure about that.... i am sure i have done fli-plasma shit in '89 already, and i am damn sure that i wasn't the first to do it :=)
2008-06-25 14:42
Oswald

Registered: Apr 2002
Posts: 5094
and did it visualise the gravitational force between atoms or electrons or the space between them or their speed or spin or whatever else (all of which is somewhat related to density of "matter"), or molecular density ?
2008-06-25 14:46
chatGPZ

Registered: Dec 2001
Posts: 11386
no mr. troll in chief. it was a techtech thing like cruzer described, which does nothing like that. i never made a "real" plasma until around 1996. back in the days you'd get stoned for 4x4 or even 8x8 bullshit =P
2008-06-25 15:13
hollowman

Registered: Dec 2001
Posts: 474
Luca, perhaps it is easy enough to cook one the way I did it: start paintshop pro and create an image of the size 8*2048 with 256 colors, fill it with a linear gradient from black to white, decrease the color depth to two colors using ordered dither. Then use whatever tools needed to convert the image to a charset
2008-06-25 15:20
Luca

Registered: Apr 2002
Posts: 178
@hollowman: yes, that's exactly what I'm doing right now with Photoshop, but on a 8*256 window (32 chars, then copy, vertical mirror and paste). Don't like the result yet, but I'm on it, tnx ;)
2008-06-25 15:22
Oswald

Registered: Apr 2002
Posts: 5094
Quote: no mr. troll in chief. it was a techtech thing like cruzer described, which does nothing like that. i never made a "real" plasma until around 1996. back in the days you'd get stoned for 4x4 or even 8x8 bullshit =P

oh, and your "real" plasma in 1996 did visualise the gravitational force between atoms or electrons or the space between them or their speed or spin or whatever else (all of which is somewhat related to density of "matter"), or molecular density ? :))
2008-06-25 15:22
chatGPZ

Registered: Dec 2001
Posts: 11386
i personally would exactly recommend the opposite.... do NOT generate the dither chars automatically - hand drawn chars can be made to show a lot less blocky artefacts.
2008-06-25 15:38
Luca

Registered: Apr 2002
Posts: 178
Quote: i personally would exactly recommend the opposite.... do NOT generate the dither chars automatically - hand drawn chars can be made to show a lot less blocky artefacts.

Mh, that's quite interesting, 'coz I used to hand drawn it too, but I guessed it would to be better if calculated... Hence, I did well and I didn't know yet :)
2008-06-25 15:42
chatGPZ

Registered: Dec 2001
Posts: 11386
it really depends on your definition of "better" =) generating will always give you "perfect" dithered chars, but especially with effects like plasmas, where often the gradients are quite "sharp" they seem to show block artefacts more than other methods....

oh and well, i'd also recommend to not only play around with the usual dither characters (boooooring =P) - play with other stuff too, just as small animations (spinning thingies, jumping dots, deforming circles...whatever you can think of) which sometimes give very interisting results.
2008-06-25 15:51
Luca

Registered: Apr 2002
Posts: 178
Quote: it really depends on your definition of "better" =) generating will always give you "perfect" dithered chars, but especially with effects like plasmas, where often the gradients are quite "sharp" they seem to show block artefacts more than other methods....

oh and well, i'd also recommend to not only play around with the usual dither characters (boooooring =P) - play with other stuff too, just as small animations (spinning thingies, jumping dots, deforming circles...whatever you can think of) which sometimes give very interisting results.


Yeah did'em too (although 16 chars deep only), but I really need the classic boring dithering, because I'm managing an ECM plasma, and colours really have to merge together. I'm just happy of the result, and it runs realtime and fullscreen at 2.5 frames, but hey, 64 chars deep dithering would be better anyway! =)
2008-06-25 15:55
Luca

Registered: Apr 2002
Posts: 178
Ouch! What a damn stupid I am: if I apply a black-to-white linear gradient, it has to be not on 32 chars, but on 33 (the white one!).
2008-06-25 16:59
Oswald

Registered: Apr 2002
Posts: 5094
Luca, for ECM plasma you should go through smash demos and ripp one from one of them :)
2008-06-25 17:40
Graham
Account closed

Registered: Dec 2002
Posts: 990
Better rip the original: Produkthandler Kom Her
2008-06-25 18:08
Luca

Registered: Apr 2002
Posts: 178
Oh, no no, why? I'm so proud of my lil' hue-cycling 9 colours realtime fullscreen ECM plasma on Plus/4 (but easy to port on C64 too)! =)
After the 64 chars cure, now it looks this way:
ecm_plasma_prv.wmv - 2.73MB
2008-06-25 18:19
Oswald

Registered: Apr 2002
Posts: 5094
wow, didnt know +4 has ecm :) a plasma should look really nice with some palette cycling :) tho 2.5 frame sounds pretty slow. use Graham's trick to add up the sines: lda (zppointertochartable+sine1+sine2),sine3+sine4 ;)
2008-06-26 12:49
Shadow
Account closed

Registered: Apr 2002
Posts: 355
I am intrigued by that 'Graham optimization' but I don't quite understand what that piece of pseudo code represents.

If we step away from ECM and goes to a normal, 8x8 char plasma with a wraparound charset, my routine looks like this:

Drawing routine (unrolled for each char on screen):

lda sinea+0
adc sineb+0
sta $0400+40*0+0
lda sinea+1
adc sineb+0
sta $0400+40*0+1
...

sine update routine (unrolled 256 times):

lda sine1+0,x
adc sine2+0,y
sta sinea+0
lda sine3+0,x
adc sine4+0,y
sta sineb+0
lda sine1+1,x
adc sine2+1,y
sta sinea+1
...

How would the 'Graham optimization' come into play here, or is it only applicable in ECM (where you do a table lookup before placing chars)
2008-06-26 16:52
Oswald

Registered: Apr 2002
Posts: 5094
with your labels it is: lda (sinea),sineb you have the (),y adressing mode do the addition.

you setup a bunch of zp pointers so, that the high byte points to your palette which is page aligned, and it either contains colors or in case of charmode: 0,1,2,3,... or 0,0,1,1.... etc. you get the idea.

the low byte contains your prepared sinea values.

now you have for each column one sinea zp pointer, and for each row one sineb value in a table (or vice versa).

then you can keep Y the same for each column (or row) the same so you dont have to reload it for each 'pixel'. and have the (),y do the final addition & tablelookup at the same time.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Rub_0201
fuzzybad
Rebok/BOOM!/Tropyx
iceout/Avatar/HF
McGurk/Coma
radius75
Guests online: 121
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.8)
5 S!R  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.117 sec.