1
$\begingroup$

I am interested in the distance between the 2 outer (left & right: P0 & P2) control-points of a quadratic Bézier curve that goes through 3 data points. The curve's non-equidistant control points are different from the 3 data points (sampled concurrent x&y values from the curve): image.

Is there a shortcut to calculate the x-axis coordinates of these outer control points (P0 & P2) for my curve? I could then simply fit a parabola to my 3 points (ax^2+bx+c) and "cut" it off vertically at these 2 points on the X-axis, so I have a curve with the same shape as my old Bézier curve, but this time in a simple non-parametric/explicit y=f(x) form!

Or is there another way to calculate this distance?

Hardly an original idea I guess, but any help is mucho appreciado!!

$\endgroup$
1
$\begingroup$

I can't view your picture, so I'm not 100% sure what you're trying to do. Specifically, I don't know what "data points" you're talking about. Can you upload your picture to this site, please. Just click on the "picture" icon above the editing panel.

But it sounds like you want to take an arbitrary quadratic Bezier curve and express it in the form $y = ax^2 + bx + c$. In general, this is not possible -- take for example the curve with control points $P_0 = (0,0)$, $P_1 = (2, 1)$, $P_2 = (0,2)$. You can construct an equation of the form $y = ax^2 + bx + c$ that is an approximation of the original Bezier curve, but, as my example shows, it will sometimes be a very poor approximation.

Any quadratic Bezier curve is a parabola, but in general, this parabola will be rotated so that its axis of symmetry is at some angle (not vertical). So, it is possible to get an equation of the form $ax^2 + bxy + cy^2 + dx + ey + f = 0$, but that's the best you can do.

Back to your "data points". Three points that are to be interpolated do not uniquely define a quadratic Bezier curve, so, if you want three data points to be the inputs to the calculation, you'll have to provide a bit more info, too. See this topic for more details.

$\endgroup$
  • $\begingroup$ If Bx(t) is a parabola (ax^2+bx+c), I can do a regression and find its function, then I can calculate the inverse, apply that to both the data points of Bx(t) and By(t), resulting in Bx(t)_transformed being linear and By(t)_transformed having the same shape as B(t), only this time with evenly spaced x axis coordinates. Correct? A parabola has 2 inverse functions so.. $\endgroup$ – MisterH Aug 25 '13 at 12:44
  • $\begingroup$ Sorry, but I have no idea what you're talking about. $\endgroup$ – bubba Aug 25 '13 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.