Re:Seven Sins of Numerical Linear Algebra
by bob1029 on Wednesday October 12, 2022 @01:36PM
(#33180307)
Per the first sin, is there any alternative for computing the view matrix from a camera matrix in 3d graphics? This is a case where inversion "feels" appropriate to me.
[ Parent
| on HN ]
Re:Seven Sins of Numerical Linear Algebra
by phao on Wednesday October 12, 2022 @02:08PM
(#33180717)
He is mostly talking about computational linear algebra problems of a large scale type due to large matrices: the "computational intensity" comes from having really large matrices (kxk for k = 100's, 1 000's, 10 000's, 100 000's, 1 000 000's, ...).
In computer graphics, the situation is often different. Usually, you have small matrices (kxk for k=2,3,4); a huge number of vectors; and you want to apply your matrix to all of those vectors. Very often, these matrices have very well known forms and also known well behaved inverses. There isn't really a significant computational cost in computing the inverse (you'll very often write down its formula by hand), and conditioning is usually not an issue (consider a rotation matrix for example or undoing translations with homogeneous coordinates).
Re:Seven Sins of Numerical Linear Algebra
by bob1029 on Wednesday October 12, 2022 @02:45PM
(#33181245)
Thank you for the clarification. I didn't realize we were talking about that kind of scale.
Re:Seven Sins of Numerical Linear Algebra
by mrjet on Thursday October 13, 2022 @11:53AM
(#33192715)
You may need an inverse, but you shouldn’t call .inverse() or inverse(A).
Since transformation matrices have simple structure, you can invert them much much faster.
Ex: inverse(R, u) is (R^T, -R^T * u)