# Get the position and orientation from an affine transformation

I have a computed matrix for the transformation of an object in the game world, and I want to compute its position and orientation. Is there a function to do this in nalgebra/nphysics?

Pointless waffle wrote before I’d thought about what I actually need:

I’m going to define a graphics transformation as a scale, followed by a rotation, followed by a translation in affine space because I don’t know its name (please help me here ).

We know that the set of linear transformations is closed under composition (multiplication of matrices), but what about the space of graphics transformations? (A set of operations is closed under composition if the composition of 2 operations is also an operation.) I asked this question on stack overflow, and the answer was basically that it is closed if you use only uniform scaling, but I think it’s slightly more general than this - I think the set is closed as long as any non-uniform scaling happens before any rotation, and it might be iff. I haven’t actually tried to prove this though.

It seems that there is a trait for this in `alga` (`alga::linear::AffineTransformation`), but that this isn’t implemented for anything in nalgebra. Would people be amenable to me implementing it?