Script contest entries.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1296 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
21
scripts/Downbringer2.lua
Normal file
21
scripts/Downbringer2.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Picture distortion: Sine
|
||||
|
||||
w, h = getpicturesize()
|
||||
|
||||
frq = 2
|
||||
amp = 0.3
|
||||
|
||||
|
||||
for y = 0, h - 1, 1 do
|
||||
for x = 0, w - 1, 1 do
|
||||
|
||||
ox = x / w;
|
||||
oy = y / h;
|
||||
ox = (1 + ox + math.sin(oy*math.pi*frq)*amp) % 1;
|
||||
|
||||
c = getbackuppixel(math.floor(ox*w),y);
|
||||
--c = y % 16
|
||||
putpicturepixel(x, y, c);
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user