Smoother jelly / water effect on an image
perhaps:
timg = ImageEffect[img, {"TornFrame"}];
tr[t_] := # + {5 10^-3 Cos[20 #[[2]] + 5 t], 5 10^-3 Sin[20 #[[1]] + 5 t]} &
frames = Table[ImageTransformation[timg, tr[t]], {t, Subdivide[0, 2 Pi, 40]}];
ListAnimate @ frames
This method seems to work quite well. Instead of changing the positions randomly, I rotate each vertex around in a small circle centered at each original vertex position. Every vertex starts at a randomly assigned phase so the polygons are not all in sync:
img = ExampleData[{"TestImage", "House"}];
mesh = TriangulateMesh[Rectangle[{0, 0}, {1, 1}],
MaxCellMeasure -> .003]
coords = MeshCoordinates[mesh];
cells = MeshCells[mesh, 2];
texture = Texture[img];
phases = RandomReal[{0, 2 Pi}, Length[coords]];
amplitude = 0.012;
frequency = 1.;
period = 1/30.;
ParallelTable[
With[{newcoords =
MapThread[#1 +
amplitude {Cos[2 Pi t frequency + #2],
Sin[2 Pi t frequency + #2]} &, {coords, phases}]},
Graphics[{texture,
GraphicsComplex[newcoords, cells,
VertexTextureCoordinates -> coords]}]
]
, {t, 0, 1, period}] // ListAnimate