Hi,
you should make a mesh feed by a 3 3 matrix to setcell and make any distortions you want, texturize it, et voilà.
here’s a dirty patch, sorry but I think it does what you want.
Ask if any questions.
Ad

-- Pasted Max Patch, click to expand. --

Copy all of the following text. Then, in Max, select New From Clipboard.