I actually wrote this in java while messing around with some ideas on warping of a 2 dimensional surface