Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Plasma-effect/XPL0/plasma-effect.xpl0
Normal file
19
Task/Plasma-effect/XPL0/plasma-effect.xpl0
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
func real Dist(X1, Y1, X2, Y2);
|
||||
int X1, Y1, X2, Y2;
|
||||
return sqrt( float((X1-X2)*(X1-X2) + (Y1-Y2)*(Y1-Y2)) );
|
||||
|
||||
int Time, X, Y, Color;
|
||||
real Value;
|
||||
[SetVid($112); \640x480x24
|
||||
repeat Time:= GetTime/50_000;
|
||||
for Y:= 0 to 256-1 do
|
||||
for X:= 0 to 256-1 do
|
||||
[Value:= Sin(Dist(X+Time, Y, 128, 128) / 8.0) +
|
||||
Sin(Dist(X, Y, 64, 64) / 8.0) +
|
||||
Sin(Dist(X, Y+Time/7, 192, 64) / 7.0) +
|
||||
Sin(Dist(X, Y, 192, 100) / 8.0);
|
||||
Color:= fix((4.0+Value) * 31.875); \[0..255]
|
||||
Point(X, Y, Color<<16 + ((Color*2)&$FF)<<8 + (255-Color));
|
||||
];
|
||||
until KeyHit;
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue