instructions for spline diagram

note: this is an improved version of a program by Lubos Brieda
Here is the theory behind some modifications.

what did I change?