PHP GD c-spline, Akima spline and Bezier curve implementation