Here's the my slow flame/plasma on HiSpeed Pascal
{ Flame.pas ; HiSpeedPascal Amiga/TP 7.0 compatibly (c) aGGreSSor, 30-Jun-00 }
program Flame;
uses Crt,Graph;
var GrDriver,GrMode,x,y,n,m,i,r: integer;
A: real;
CTab: array [0..10,0..50] of integer;
procedure Clear_Tab;
begin
FOR x:=0 TO 50 DO
FOR y:=0 TO 10 DO
CTab [x,y]:=0;
end;
procedure RND_Tab;
begin
y:=10; Randomize;
FOR n:=0 TO 50 DO
begin
r:=Random(5);
CTab[n,y]:=r;
end;
end;
procedure Calc_Tab;
begin
FOR y:=1 TO 9 DO
begin
FOR x:=1 TO 49 DO
begin
A:=Int((CTab[x+1,y+1]+CTab[x-1,y+1])/2);
CTab[x,y]:=Trunc(A);
end;
end;
end;
procedure Print_Tab;
begin
FOR y:=1 TO 9 DO
FOR x:=1 TO 49 DO
putpixel (x+135,y+160,CTab[x,y]);
end;
{ flame/plasma process.. }
begin
GrDriver:=CGA; GrMode:=CGAc0; {CGA, 320x200, 4 colors}
InitGraph (GrDriver,GrMode,' '); {0-black, 1-blue, 2-red, 3-magenta}
Clear_Tab; m:=0;
REPEAT
RND_Tab;
Calc_Tab;
Print_Tab;
UNTIL m=250;
m:=0;
REPEAT
FOR x:=0 TO 50 DO
begin
CTab[x,10]:=0;
end;
Calc_Tab;
Print_Tab;
m:=m+1;
UNTIL m=30;
{ delay (1000); }
CloseGraph
end.
Hehe