When a point in s coordinates should be interpreted in another d coordinates, the transformation matrix between coordinate systems is needed. That is, the point in s coordinates is not moved and is just reinterpreted from the point of view of the d system. This kind of transformation can be everywhere such as OC-to-WC or WC-to-EC. Technically, a point in s coordinates can be rewritten as follows. ⎝⎛000⎠⎞+xs⎝⎛100⎠⎞+ys⎝⎛010⎠⎞+zs⎝⎛001⎠⎞
It implies that the point is located by moving xs towards (100)t, yx towards (010)t, and zs towards (001)t starting from the origin (000)t. Let (oxoyoz)t be the origin of d coordinates. Then, the same point can be reinterpreted from the point of view of the d coordinates. ⎝⎛oxoyoz⎠⎞+xd⎝⎛uxuyuz⎠⎞+yd⎝⎛vxvyvz⎠⎞+zd⎝⎛nxnynz⎠⎞
Considering that these two interpretations have the same meaning, ⎝⎛xsyszs⎠⎞⟹⎝⎛xdydzd⎠⎞=⎝⎛oxoyoz⎠⎞+⎝⎛uxuyuzvxvyvznxnynz⎠⎞⎝⎛xdydzd⎠⎞=⎝⎛uxuyuzvxvyvznxnynz⎠⎞−1⎝⎛⎝⎛xsyszs⎠⎞−⎝⎛oxoyoz⎠⎞⎠⎞=⎝⎛uxvxnxuyvynyuzvznz⎠⎞⎝⎛⎝⎛xsyszs⎠⎞−⎝⎛oxoyoz⎠⎞⎠⎞
The last part is because u, v, and n column vectors compose the orthonormal matrix. Using a homogeneous system, this result can be rewritten about the transform matrix M. ⎝⎛uxvxnxuyvynyuzvznz⎠⎞⎝⎛oxoyoz⎠⎞≡⎝⎛txtytz⎠⎞⟹M=⎝⎛uxvxnx0uyvyny0uzvznz0−tx−ty−tz1⎠⎞⟹⎝⎛xdydzd1⎠⎞=⎝⎛uxvxnx0uyvyny0uzvznz0−tx−ty−tz1⎠⎞⎝⎛xsyszs1⎠⎞=⎝⎛uxvxnx0uyvyny0uzvznz00001⎠⎞⎝⎛100001000010−tx−ty−tz1⎠⎞
Note that u, v, and n are set as row vectors in M. More importantly, M has an intuitive interpretation that it pulls the origin of d coordinates to the origin of s coordinates and then spins the three axes of d coordinates to fit the axes of s coordinates.
Sometimes, it is very confusing whether to set u, v, and n as row vectors or column vectors. Here is a tip. u, v, and n that are defined in s coordinates should be the standard basis in d coordinates. So, the following simple calculation may help to set directions. Let M33 be the 3×3 submatrix of M. M33⎝⎛uxuyuz⎠⎞=⎝⎛100⎠⎞,M33⎝⎛vxvyvz⎠⎞=⎝⎛010⎠⎞,M33⎝⎛nxnynz⎠⎞=⎝⎛001⎠⎞
Keep going!Keep going ×2!Give me more!Thank you, thank youFar too kind!Never gonna give me up?Never gonna let me down?Turn around and desert me!You're an addict!Son of a clapper!No wayGo back to work!This is getting out of handUnbelievablePREPOSTEROUSI N S A N I T YFEED ME A STRAY CAT