you could achieve this in several different ways. for an easy 2d setup see the attached patch. (better yet: Joanie Lemerciers AntiVJ mapping toolkit)
for a 3d setup you should read up this really good tutorial)-and-definitely-check-out-((contribution:vvvv.tutorials.mapping.3d) by elliot woods.