Tercja

It looks like code is somewhat working. Shape of the curve is kept when changing start and end point.

Code includes sample usage as well as plot which helps to calibrate parameters.
Plot requires matplotlib and numpy.