Search code examples
geometrybezierpointcurve

Bézier curve compute point from one axis


I have a Cubic Bézier curve. But I have a problem when I need only one point. I have only value from the X-axis and want to find a value that coresponds to Y-axis to that point. Or find the t step, from it I can easely calculate the Y-axis.

Any clue how to do it? Or is there any formula to do this?


Solution

  • A parametric curve extends to any dimension by adding coefficients for those dimensions. Are you sure you've got things straight? It seems like you are using the x-axis as the curve parameter t. The t parameter controls the computations of X- and Y-coordinates by having two cubic equations. Take a look at Wikipedia which provides some pretty neat explanations for the 2D case.

    Edit:

    Solve as a general third-degree polynomial. Beware that it might have 3 solutions, though.