Creating a spline curve between two points