bezier and spline in 2d