Registered Member
|
Hello.
I need to solve a linear system for 2 unknowns, but I am overwhelmed by the terminology of everything and don't know what I need. It's something like this: px = (uo + tx) • (us • ux) + (vo + ty) • (vs • vx) py = (uo + tx) • (us • uy) + (vo + ty) • (vs • vy) pz = (uo + tx) • (us • uz) + (vo + ty) • (vs • vz) All variables except tx and ty, which I want to find, are known. What do I need to use to do something like that with this library? Thanks in advance! |
Moderator
|
Your system is overdetermined, so I guess your looking for a least-square solution. Anyway, you need to rewrite your system of equation in matrix form such that it looks like A * t = b with A a 3x2 matrix and b a 3x1 vector and t the 2x1 vector of unknown. Then look at the tutorial on solving linear system: http://eigen.tuxfamily.org/dox/group__T ... gebra.html. For instance, you can get t as:
|
Registered Member
|
I am in a hurry with everything and found a solution to my problem using dot products of vectors. If I have time left later (in 2 weeks or so) I'll still want to give this approach a try since it looks like something worth learning.
In any case, thanks for the answer! |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]