//Adapted from http://paulbourke.net/miscellaneous/interpolation/ //Original author: Paul Bourke ("Any source code found here may be freely used provided credits are given to the author.")