How to find a center/axis of rotation? I have a 3d model (M1) consisted of several points. I know all their coordinates. I also have another model (M2). M2 and M1 are the same, but M2 is a model after rigid transformation. I don't know the axis or the center of transformation. The only thing I know is the type of transformation - translation or rotatation. So my question is - how can I find the center or the axis of rotation, and the the value of angle? 
 A: Translation from the original (unprimed) frame to the new (primed) frame is fairly simple: $\vec{x'} = \vec{x} + \vec{R},$ with $\vec{R}$ being a constant vector of translation.
Rotation is a bit trickier.  You might have as many as three angles to deal with: one for each principal axis.  These rotations are expressed as a product of rotation matrices.  The elements of the product matrices are the direction cosines of the original axes and the new axes.
A: You can derive the basis transform T which maps M1 to M2 (I explained the process here).  Once done, you can then "read out" the basis vectors and use the cosines of the axes to determine the angle.
A: !IF! you can identify the "same" points on the two models (maybe the same index in the arrays of points), you can actuall "choose" a translation that would fix the point of rotation\s and have them share a common axis:  
Calculate the mean point of each of the two models (maybe convex hull to simplify, primed stand for M2):
$$\overline{p}=\frac{1}{n}\sum_{k=1}^np_k, \space \overline{p}^{'}=\frac{1}{n}\sum_{k=1}^np_k^{'}$$
Now, $\vec T=\overline{p}^{'}-\overline{p}$ is the translation vector.
Next, apply $-\vec T$ to $M_2$ so that it also has mean point $\overline{p}$ (Hence it just as if it was rotated around $\overline{p}$) and denote it $M_2^{'}$  
Next, Choose two corresponding points from the models ($p_1,p_2 \in M_1, \space p^{'}_1,p^{'}_2 \in M_2^{'}$), and use them to construct two vectors:
$$\vec{x}=p_2-p_1, \space \vec{x}^{'}=p^{'}_2-p^{'}_1.$$
The axis of rotiation can be obtained using the cross product (normalized):
$$\vec {Ro}=\frac{\vec x \times \vec{x}^{'}}{|\vec x|^2}$$
Then, the angle is just:
$$\theta_{Ro}=\arcsin(|\vec {Ro}|)$$  
All this correspods to:
1. $M_1$
2. Rotate by $\theta_{Ro}$ about $\overline{p}$ with $\vec {Ro}$ corresponding to the axis of rotation.
3. Translate by $\vec T$
4. $M_2$
