See http://people.sc.fsu.edu/~jburkardt/f_src/blend/blend.html and https://github.com/johannesgerer/jburkardt-f