vvvv is a visual programming environment for motion graphics and interaction. It is free for non-commercial use.
They have a projection mapping tutorial here.