Initial effort to warp a perspective

Probably still has loads of bugs, but I can't test it right now.