# Transformation matrices: translations

I haven’t done algebra in 4 years and even back then we didn’t cover some of the stuff I’m about to ask. Everything I’ve relearned has come from various websites so it’s a patchwork of information (therefore I may have a few concepts wrong, forgive me). All of this refers to points in Cartesian space (I am using 3-space but all of this applies to 2-space as well, of course).

Anyway, I understand rotation matrics, and I understand that they are orthonormal so that if I want to queue up a bunch of rotations I can simply multiply all the different matrices together, and since they are all orthonormal I get an orthonormal resultant matrix that is the net rotation. Now, what I have not been able to find is a translation matrix. When I think about it, it makes total sense because a translation matrix probably doesn’t exist. It is so much easier to simply translate by adding a vector to the existing point. Also, the order of translation and rotation applied to a point does matter. So if I want to do 4 rotations, then a translation on x, then another 2 rotations, and finally a translation on y, the order matters. I couldn’t simply apply a net of 6 rotations and then the x, y, translations. It wouldn’t give me the result I want.

So in light of all of this, I am currently multiplying rotation matrices together as rotations are called, and when a translation is called, I first apply the net rotation matrix, then apply the translation. Is there a more efficient way to go about this?

The next issue I have is with the axis of rotation. Currently, I have rotation matrices that rotate about the origin, and about an arbitrary vector extending from the origin. I needed a method to rotate about an axis defined by a line segment. So what I currently do is translate the line segment to the origin (and also translate the points to be rotated the same amount), rotate using my arbitrary vector matrix, then move everything back where it started. This works fine, but again, since this method involves translating (therefore it involves applying any preceding rotations and then applying the two translations), it is not as efficient as simply rotating about the origin. Is there a more efficient way of doing this?

If anybody can help increase the efficiency of my methods, I would greatly appreciate it.

-Al

I’m not a specialist [SIZE=1]at all[/SIZE], but I would do exactly the same as you did.

pom C:-)