Previous | Next --- Slide 41 of 59
Back to Lecture Thumbnails
idontknow

Since we are using an extra dimension to calculate translations, our computer needs to do extra work. I can imagine that for a large number of translations this extra work could add up. Is there ever a case where it is more efficient to represent a translation as a vector rather than a matrix? Or is it practical for most cases to just keep it as a matrix operation?

Max

It does add a bit of extra work. But, if we have a ton of vectors to apply several transformations to, we can combine the transformations into one matrix first, then apply the combination, which is only slightly more work than doing a 3x3 transform and adding a translation. Plus, of course, the order of transforms matters, so it is more convenient and efficient to bake in translations to the matrix expression instead of splitting up [linear, translate, linear, translate, ...]. Finally, also note that if you implement the math using SIMD instructions, it is almost entirely free to use 4-component vectors and matrices compared to 3-component.