Find coefficients of quadric equation

148 Views Asked by At

I try to find the ten coefficients that describe the equation of a quadric in a 3D space by knowing ten points belonging to that quadric. I have a system of equations with ten equations that are homogeneous. Because they are homogeneous, the only and trivial solution using matrix method is {0,0,0,0,0,0,0,0,0,0}. So how can I really solve my system ?

Thanks

EDIT the equation of a quadric in a 3D space is :

Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + J = 0, where the unknowns are A B C D E F G H I and J.

Knowing 10 points belonging to the quadric, we have a system of equation:

Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0
Ax² + By² + Cz² + Dxy + Eyz + Fxz + Gx + Hy + Iz + 1J = 0

(Of course, x y and z of each line are those of one point).

With the matrix method, we want to solve aX=b => X=a-1b with "a" being the matrix of the known coef of the system (x², y², y², xy, yz, xz, x, y, z, 1) for each point, X being the vector to be solved (A, B, C, D, E, F, I, J,) and "b" being the second member vector (0,0,0,0,0,0,0,0,0,0) because the equations of the system are homogeneous.

So the result is X=a-1b => X = a-1*0 => X=0 in all cases, and that's my issue.

2

There are 2 best solutions below

3
On BEST ANSWER

You are not counting correctly. Because the system is homogeneous only the ratios of the coefficients are important, and with ten coefficients, you can define only nine ratios independently. That's what sets your degrees of freedom. You have to draw your quadric surface through nine points rather than ten.

Having properly selected nine points, you may use approaches by amd (this answer) to solve the system. Note that this method is superior to assuming a specific coefficient such as $J$ is nonzero because in practice, no individual coefficient is guaranteed nonzero for every quadric surface.

0
On

As Oscar Lanzi points out in his answer, there are only nine degrees of freedom, so you need only nine points in general position.

Knowing the coordinates of these points, you can immediately write an equation of the conic in the form of a determinant: $$\begin{vmatrix} x^2&y^2&z^2&xy&yz&xz&x&y&1 \\ x_1^2&y_1^2&z_1^2&x_1y_1&y_1z_1&x_1z_1&x_1&y_1&1 \\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots \\ x_9^2&y_9^2&z_9^2&x_9y_9&y_9z_9&x_9z_9&x_9&y_9&1 \end{vmatrix} = 0.$$ (This is Cramer’s rule in disguise.) To compute the coefficients, expand this determinant.

This is an unpleasant calculation if you’re doing this by hand, so an alternative is to find a null vector of the above matrix with the first, variable, row deleted. The elements of this vector are the coefficients you seek. This can be done using several methods such as Gaussian elimination. There are numerical stability issues with that method, though, so for that reason and also to deal with other limitations of floating-point arithmetic, a common method in practice is to compute the SVD and take the right singular vector that corresponds to the least singular value.