Archived

This topic is now archived and is closed to further replies.

Magnus

Plasmas

Recommended Posts

NuFAN    122
Hi,
there are several ways to create a plasma, you could create one based on a sinus curve like this :


procedure PutPixel(x, y : word; col : byte); assembler;
asm;
push 0a000h
pop es
mov ax, y
mul 320
add ax, x
mov di, ax
mol al, byte ptr col
mov es:[di], al
end;

procedure DoPlasma;
var col : byte
begin
for y := 0 to 199 do
for x := 0 to 319 do
begin
col := 127 + 63.5 * sin(x * 10) + 63.5 * sin(y*10);
PutPixel(x, y, col);
end;
end;


There are more ways to create a plasma. You could also create one through palette rotation, but that looks ugly IMO.

CU

Graphix Coding @
Skullpture Entertainment

Share this post


Link to post
Share on other sites