How to get the coefficients in a parametric cubic function

103 Views Asked by At

Let's say I have 4 points with x and y coordinates. And I want to determine the parametric cubic function: $x(t) = a_x t^3 + b_x t^2 + c_x t^3 + d_x$ and $y(t) = a_y t^3 + b_y t^2 + c_y t^3 + d_y$

So, how can I determine the 8 coefficients $ a_x, b_x, c_x, d_x, a_y, b_y, c_y, d_y $ from those 4 points. Is it similar to estimation of 4 coefficients $ a, b, c, d $ in the cubic polynom?

1

There are 1 best solutions below

0
On

You have to specify at which time $t_1$ you want to be at the first point, at which time $t_2$ you want to be at the second point, at which time $t_3$ you want to be at the third point, and at which time $t_4$ you want to be at the fourth point. Typically, you will choose this values to fulfill $0=t_1<t_2<t_3<t_4=1$. For example, you could choose $t_1=0, t_2=\frac{1}{3}, t_3=\frac{2}{3}, t_4=1$.

By inserting $x_n, y_n, t_n$ for $n=1,2,3,4$ in the equations for $x(t)$ and $y(t)$, you get 8 equations with 8 variables ($a_x, b_x, c_x, d_x, a_y, b_y, c_y, d_y$). So you have a system of linear equations which you need to solve in order to get the values for your parameters.