# Algorithmic Modified Denavit-Hartenberg Modeling for Robotic Manipulators Using Line Geometry
## 3 Line Geometry
### Relationships Between Two Lines  
Another important property of the Plucker coordinate is the reciprocal product between two lines. When two lines are denoted as \(L_{1}(\hat{z}_{1},v_{1}=p_{1}\times\hat{z}_{1})\) and \(L_{2}(\hat{z}_{2},v_{2}=p_{2}\times\hat{z}_{2})\), as shown in Figure 3, it is defined as follows:  
\[L_{1}*L_{2}:=\hat{z}_{1}\cdot v_{2}+\hat{z}_{2}\cdot v_{1}, \tag{14}\]  
where the reciprocal product implies the moment of line \(L_{1}\) about line \(L_{2}\) or the moment of \(L_{2}\) about \(L_{1}\). It is interesting that the reciprocal product is independent of the location of \(p_{1}\) on \(L_{1}\) or \(p_{2}\) on \(L_{2}\), and it is only dependent on the direction vectors \(\hat{z}_{1}\) and \(\hat{z}_{2}\). In addition, the reciprocal product is scalar, not a vector. Let us denote the moment \(v_{21}\) of the line \(L_{2}(\hat{z}_{2},v_{2})\) about the point \(t_{1}\) using Equation (12):  
\[v_{21}=v_{2}-t_{1}\times\hat{z}_{2}=(t_{2}-t_{1})\times\hat{z}_{2}, \tag{15}\]  
Figure 2: Relationships between a line \(L(\hat{z},v)\) and a point \(p\) on the line, and between the line and a point \(t\) out of the line in three-dimensional space.  
where \(t_{1}\) and \(t_{2}\) are feet of the common perpendicular line to the two lines \(L_{1}\) and \(L_{2}\) as shown in Figure 3.  
Let us define the plane \(\Pi\) containing \(\hat{z}_{2}\) and \(v_{21}\) as shown in Figure 4, which is orthogonal to the common perpendicular line and parallel to \(\hat{z}_{1}\). Consequently, the plane \(\Pi\) contains \(\hat{z}_{1}\) as shown in Figure 4. Using the fact that the link twist \(\alpha\) is the angle of rotation from \(\hat{z}_{1}\) to \(\hat{z}_{2}\) about the common perpendicular line, the reciprocal product can be recomputed as follows:  
\[L_{1}*L_{2}=-\|v_{21}\|\sin\alpha, \tag{16}\]  
where \(\|v_{21}\|\) implies the distance between \(L_{1}\) and \(L_{2}\). Thus, it provides the information on the link length \(a\) in Figure 1 as follows:  
\[a=\|v_{21}\|=-\frac{L_{1}*L_{2}}{\sin\alpha}=-\frac{\hat{z}_{1}\cdot v_{2}+ \hat{z}_{2}\cdot v_{1}}{\|\hat{z}_{1}\times\hat{z}_{2}\|}. \tag{17}\]  
As a matter of fact, the reciprocal product becomes zero either when the two lines are intersected (\(a=0\)) or when the two lines are parallel (\(\alpha=0\)), where the link twist \(\alpha\) in Figure 1 is defined by the angle of rotation from \(\hat{z}_{1}\) to \(\hat{z}_{2}\) about the common perpendicular line, which is calculated as follows:  
\[\alpha=\text{atan2}(\sin\alpha,\cos\alpha)=\text{atan2}(\|\hat{z}_{1}\times \hat{z}_{2}\|,\hat{z}_{1}\cdot\hat{z}_{2}), \tag{18}\]  
where it is effective for a positive range of \(0\leq\alpha\leq\pi\). To cover its negative range of \(-\pi\leq\alpha\leq 0\), the sign variable denoted by \(s_{x}\) will be considered later.  
Figure 4: The plane \(\Pi\) contains \(\hat{z}_{2}\) and \(v_{21}\), which is orthogonal to the common perpendicular line and parallel to \(\hat{z}_{1}\); consequently, it contains \(\hat{z}_{1}\) as well, where \(\alpha\) implies the twist angle of rotation from \(\hat{z}_{1}\) to \(\hat{z}_{2}\) about the common perpendicular line, and \(\hat{z}_{2}\) is perpendicular to \(v_{21}\).