I have a cubic bezier with 2 control points. Starting point and control points are known. Need to get all the points of the curve, given the control, starting and ending poi
De Casteljau algorithm is more numerically stable. Here it has additional advantage that it calculates the tangent line (and thus, the tangent angle) as the step immediately prior to calculating the point.
But, it works according to a parameter value, not length. It is preferable to calculate points by parameter, not value, as part of rendering the curve. Parameter's range will be [0 ... 1]
, 0
corresponding to the starting, and 1
the ending point of the curve.