Splines in c#
https://gist.github.com/dreikanter/3526685