I have a function that will return any point(x,y
) along a curve from its start point to its end point: getPointOnCurve(t)
, where t is a number from 0–1, 0 being the point at the start of the curve, 1 being the end of the curve and the values between 0 and 1 being points in between.
I need to draw a cubic Bezier curve that describes this curve. I have access to the start and end points, however I don’t have access to the two control points, so I need a way to calculate those.
Given that I know the start and end points, and can provide any point along the curve, along with the point’s distance along the curve, is it possible to calculate the two control points?
I can’t find a definitive answer on whether this is possible, and if it is, how accurate it might be.
Please assume that the curve can be described by a cubic Bezier curve.