grafX2/scripts/Downbringer2.lua
Adrien Destugues 46ed0b5718 Script contest entries.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1296 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-02 16:14:46 +00:00

22 lines
315 B
Lua

-- 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