Background:
I have a linear equation
whereas T2
and T3
are transformation matrices, Rp
is translation vector.
The equation results in 3 linear equations that can be used to solve the coordinates of Rp
. Which is what I want to do in Mathematica. In short, I want to express p_x
, p_y
and p_z
in terms of T2 and T3.
Here is my input:
T2 = {{n2x, o2x, a2x, p2x}, {n2y, o2y, a2y, p2y}, {n2z, o2z, a2z,
p2z}, {0, 0, 0, 1}}
T3 = {{n3x, o3x, a3x, p3x}, {n3y, o3y, a3y, p3y}, {n3z, o3z, a3z,
p3z}, {0, 0, 0, 1}}
Rp = {px, py, pz, 1}
eq1 = (IdentityMatrix[4] - T2 . Inverse[T3]) . Rp
Solve[eq1 == ConstantArray[0, {4}], {px, py, pz}, Reals]
Unfortunately, solve takes forever to execute. So far it didn't yield a result. Is this the correct way of solving this problem?
Thanks, Alex
UPDATE: Removed the underscores from my variable names.
Reals
. It can cause difficulty in sorting through ranges of the symbolic terms e.g. to make sure denominators do not vanish. Also you can get a smaller result like so:NullSpace[IdentityMatrix[4] - T2.Inverse[T3], Method -> "OneStepRowReduction"]
$\endgroup$