# Synthesis of Four-Link Initial Kinematic Chains with Spherical Pairs for Spatial Mechanisms
## 2 Materials and Methods
\begin{bmatrix}e_{i1}^{2}e_{i1}^{1}+m_{i1}^{2}m_{i1}^{1}+n_{i1}^{2 }n_{i1}^{1}&e_{i1}^{2}e_{i2}^{1}+m_{i1}^{2}m_{i2}^{1}+n_{i1}^{2}n_{i2}^{1}&e_{ i1}^{2}e_{i3}^{1}+m_{i1}^{2}m_{i3}^{1}+n_{i1}^{2}n_{i3}^{1}\\ e_{i2}^{2}e_{i1}^{1}+m_{i2}^{2}m_{i1}^{1}+n_{i2}^{2}n_{i1}^{1}&m_{i2}^{2}e_{i2} ^{1}+m_{i2}^{2}m_{i2}^{1}+m_{i2}^{2}n_{i2}^{1}&m_{i2}^{2}e_{i3}^{1}+m_{i2}^{2} m_{i3}^{1}+m_{i2}^{2}n_{i3}^{1}\\ n_{i3}^{2}e_{i1}^{1}+n_{i3}^{2}m_{i1}^{1}+n_{i3}^{2}n_{i1}^{1}&n_{i3}^{2}e_{i2} ^{1}+n_{i3}^{2}m_{i2}^{1}+n_{i3}^{2}n_{i2}^{1}&n_{i3}^{2}e_{i3}^{1}+n_{i3}^{2}n_ {i3}^{1}+n_{i3}^{2}n_{i3}^{1}\end{bmatrix}  \tag{9}\]  
\(T_{01}^{i}\) and \(T_{02}^{i}\) represent the rotation matrices (transposed) from each solid's local frame to the fixed coordinate system. \(T_{12}^{i}\) and \(T_{21}^{i}\) represent the relative transformations between the two solids' local frames, where \(T_{21}^{i}\) transforms the \(Q_{2}\) local frame to the \(Q_{1}\) local frame, and \(T_{12}^{i}\) does the reverse. These matrices are essential in solving for the positions and distances between points on the two solids, as they allow us to transform coordinates between different reference frames and to express the relative motion or position between the solids. The matrix system performs transformations between different coordinate frames using rotation matrices and vector translations [16], which are relative to the positions of points on the rigid bodies \(Q_{1}\) and \(Q_{2}\) in the fixed coordinate system. Following is a breakdown of the matrices and their transformations. The matrix equation for point \(A\) is  
\[ \begin{bmatrix}X_{A}\\ Y_{A}\\ Z_{A}\\ 1\end{bmatrix} = \begin{bmatrix}e_{i1}^{1}&e_{i2}^{1}&e_{i3}^{1}&0\\ m_{i1}^{1}&m_{i2}^{1}&m_{i3}^{1}&0\\ n_{i1}^{1}&n_{i2}^{1}&n_{i3}^{1}&0\\ 0&0&0&1\end{bmatrix} \times \begin{bmatrix}x_{B}\\ y_{B}\\ z_{B}\\ 1\end{bmatrix} + \begin{bmatrix}e_{i1}^{2}&e_{i2}^{2}&e_{i3}^{2}&X_{Di}\\ m_{i1}^{2}&m_{i2}^{2}&m_{i3}^{2}&Y_{Di}\\ n_{i1}^{2}&n_{i2}^{2}&n_{i3}^{2}&Z_{Di}\\ 0&0&0&1\end{bmatrix} \times \begin{bmatrix}x_{C}\\ y_{C}\\ z_{C}\\ 1\end{bmatrix}  \tag{10}\]  
This equation expresses the position of point \(A\) as the result of first applying a rotation defined by \(T_{01}^{i}\) (for solid \(Q_{1}\)) and then translating using the coordinates of point \(D\) on solid \(Q_{2}\). For point \(B\), the matrix equation is \[ \begin{split}[T_{21}^{i}]=\left[\begin{array}{c}e_{i1}^{1}e_{i1}^{2}+e_{ i2}^{1}m_{i1}^{2}+e_{i3}^{1}n_{i1}^{2}&e_{i1}^{1}e_{i2}^{2}+e_{i2}^{1}m_{i2}^{2}+e_{i3}^{1}n_{i2}^{2}&e_{i1}^{1}e_{i3 }^{2}+e_{i1}^{1}m_{i3}^{2}+e_{i3}^{1}n_{i3}^{2}&0\\ m_{i1}^{1}e_{i1}^{2}+m_{i2}^{1}m_{i1}^{2}+m_{i1}^{1}m_{i1}^{2}&m_{i1}^{1}e_{i2}^{2 }+m_{i2}^{1}m_{i2}^{2}+m_{i3}^{1}n_{i2}^{2}&m_{i1}^{1}e_{i3}^{2}+m_{i2}^{1}m_{ i3}^{2}+m_{i3}^{1}n_{i3}^{2}&0\\ n_{i1}^{1}e_{i1}^{2}+n_{i1}^{1}m_{i1}^{2}+n_{i3}^{1}n_{i1}^{2}&n_{i1}^{1}e_{i2}^ {2}+n_{i2}^{1}m_{i2}^{2}+n_{i3}^{1}n_{i2}^{2}&n_{i1}^{1}e_{i3}^{2}+n_{i2}^{1}m_ {i3}^{2}+n_{i3}^{1}n_{i3}^{2}&0\\ 0&0&0&1\end{array}\right]\end{split}  \tag{11}\]  
\[ \begin{split}\begin{bmatrix}x_{B}\\ y_{B}\\ z_{B}\\ 1\end{bmatrix}=\left[\begin{array}{cccc}e_{i1}^{1}&e_{i2}^{1}&e_{i3}^{1}&0\\ m_{i1}^{1}&m_{i1}^{1}&0\\ n_{i1}^{1}&n_{i2}^{1}&n_{i3}^{1}&0\\ 0&0&0&1\end{array}\right]\times\begin{bmatrix}X_{Di}-X_{A}\\ Y_{Di}-Y_{A}\\ Z_{Di}-Z_{A}\\ 1\end{bmatrix}+\begin{bmatrix}T_{21}^{i}\end{bmatrix}\times\begin{bmatrix}x_{C}\\ y_{C}\\ z_{C}\\ 1\end{bmatrix}\end{split}  \tag{12}\]  
where \(X_{Di}\), \(Y_{Di}\), \(Z_{Di}\) are the coordinates of point \(D_{i}\) on body \(Q_{2}\). This expression represents a combined rotation and translation for point \(B\) using the relative position of \(D\) and the transformation from \(Q_{2}\) to \(Q_{1}\). The equation for point \(C\) is  
\[\begin{split}[T_{12}^{i}]=