I'm trying to construct a plane out of three points in 3D. I want to use projective geometry to achieve this.
As far as I know, one can "simply" solve the following to find a plane:
A * x = 0 ,where
A is a 3x4 Matrix - each row being one of the points (x,y,z,1)
x is the plane I want to find
I know that I need to have a constrain. Therefore I want to set x(3) = 1
.
Can someone please point me to the right method to use?
So far I have the following code:
Eigen::Vector4f p1(0,0,1,1);
Eigen::Vector4f p2(1,0,0,1);
Eigen::Vector4f p3(0,1,0,1);
Eigen::Matrix<float,3,4> A;
A << p1.transpose(), p2.transpose(), p3.transpose();
// Throws compile error
// Eigen::Vector4f Plane = A.jacobiSvd(ComputeThinU | ComputeThinV).solve(Vector4f::Zero());
//throws runtime error (row-number do not match)
// Eigen::Vector4f Plane = A.fullPivHouseholderQr().solce(Eigen::Vector4f::Zero());