views:

157

answers:

2

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?

+1  A: 

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.

Cecil Has a Name
Yes I know that t parameter controls the computations of X- and Y-coordinates. I have the value from X-axis and need the corespondig value from the Y-axis but unfortunately I don't know the t.
Vlg
Use a bisect algorithm to approximate *t*, as heuristic use the distance from the known x-value to the currently computed x value based on current guess of *t*.
Cecil Has a Name
I thought there's a better solution. But this will have to do the trick ;) thanks bro.
Vlg
I'm currently looking into a better, matrix-based method. I'll let you know.
Cecil Has a Name
+1  A: 
MPG