logoalt Hacker News

Twisoltoday at 1:33 PM1 replyview on HN

As you say, projections and rotations are easily accounted for in linear algebra. The issue is that translations are not a linear transformation. For instance, consider f(x) = 2 + x. It's certainly not the case that f is linear -- that is, that f(cx + y) = c f(x) + f(y) -- because on the one hand we'd expect 2 + cx + y, and on the other we'd expect (2 + cx) + (2 + y), which is 4 + cx + y.

However, translation is an affine transformation, which is a particular case of a projective transformation [0]. It turns out that we can represent 3D affine (and general projective) transformations using a 4x4 matrix -- that is, as linear transformations in one dimension up, in a similar sense as how we can represent complex numbers as particular 2x2 matrices [1]. So yes, projective geometry is the right theoretical lens, even if we're usually able to forget about it (somewhat) when we use matrix representations.

[0]: https://en.wikipedia.org/wiki/Affine_transformation#Represen...

[1]: https://en.wikipedia.org/wiki/Complex_number#Matrix_represen...


Replies

aureatetoday at 1:42 PM

Ah, interesting. I see "homogeneous coordinates" are covered later in the book I've just started reading (Projective Geometry, Coxeter) as a way of representing projective space. I think that's the link I couldn't see.

Thanks!