Cubic() basically gives a cubic bezier spline where the two middle values are just control points. To have the control points land on the curve you could use Catmull-rom splines. You can find the formula for that online.
Alternately you could expand cubic out to its actual formula and calculate what values to use for the second and third parameters so the curve lands on the control points.