## 6 Uncertainties Associated with Distances Derived from Point Clouds
### Distance Measurement: Uncertainty Contribution Associated with Scale and Squareness Effects  
We consider scale and squareness model as in Equation (10), involving seven random effects \(\mathbf{b}=(b_{aa},b_{xx},b_{yy},b_{zz},b_{yy},b_{xz},b_{yz})^{\top}\). Given two data points \(\mathbf{x}_{i}\) and \(\mathbf{x}_{j}\), let \(d_{ij}=\|\mathbf{x}_{j}-\mathbf{x}_{i}\|\) and \(x_{ij}=x_{j}-x_{i},y_{ij}=y_{j}-y_{i}\) and \(z_{ij}=z_{j}-z_{i}\). Then the \(1\times 7\) sensitivity matrix \(G_{D|ij}\) of \(d_{ij}\) with respect to the scale and squareness effects \(\mathbf{e}\) is given by  
\[G_{D|ij}=\frac{1}{d_{ij}}\Big{[} \begin{array}{cccccc}d_{ij}^{2}&x_{ij}^{2}& y_{ij}^{2}&z_{ij}^{2}&x_{ij}y_{ij}&x_{ij}z_{ij}&y_{ij}z_{ij}\end{array} \Big{]}.\]  
(Strictly, \(G_{D|ij}\) is the sensitivity matrix of \(\delta_{ij}=(\mathbf{x}_{j}-\mathbf{x}_{i})^{\top}\mathbf{n}_{ij}\) where \(\mathbf{n}_{ij}=(\mathbf{x}_{j}-\mathbf{x}_{i})/d_{ij}\). We note that \(\delta_{ij}\) is a signed quantity with \(\delta_{ij}=\pm d_{ij}\)). If  
\[b_{aa}\sim\mathcal{N}(0,\sigma_{S}^{2}),\quad b_{xx},b_{yy},b_{zz}\sim\mathcal{ N}(0,\sigma_{S,a}^{2}),\]  
and  
\[b_{xy},b_{xz},b_{yz}\sim\mathcal{N}(0,\sigma_{Q}^{2}).\]then  
\[u^{2}(d_{ij})=\sigma_{S}^{2}d_{ij}^{2}+\sigma_{S,\mu}^{2}D_{S,\mu}^{2}+\sigma_{Q}^ {2}D_{Q}^{2}, \tag{31}\]  
where  
\[D_{S,\mu}^{2}=\frac{1}{d_{ij}^{2}}\left[x_{ij}^{4}+y_{ij}^{4}+z_{ij}^{4}\right],\]  
and  
\[D_{Q}^{2}=\frac{1}{d_{ij}^{2}}\left[x_{ij}^{2}y_{ij}^{2}+x_{ij}^{2}z_{ij}^{2}+ y_{ij}^{2}z_{ij}^{2}\right].\]  
The expression for \(u^{2}(d_{ij})\) in Equation (31) shows non-isotropic behaviour in that the uncertainty depends not only on the distance but also the position of the points \(x_{i}\) and \(x_{j}\). In particular, if \(x_{i}\) and \(x_{j}\) are aligned with an axis direction, the cross terms \(x_{ij}y_{ij}\) are all zero along with two of \(x_{ij},y_{ij}\) and \(z_{ij}\). For this case, \(u(d_{ij})\) is given by  
\[u^{2}(d_{ij})=(\sigma_{S}^{2}+\sigma_{S,\mu}^{2})d_{ij}^{2},\]  
and does not have a contribution from squareness effects. If \(d_{ij}=\|x_{j}-x_{i}\|\) and \(d_{rs}=\|x_{s}-x_{r}\|\), then  
\[u^{2}(d_{ij}-d_{rs})=\sigma_{S}^{2}(d_{ij}-d_{rs})^{2}+\sigma_{S,\mu}^{2}D_{S, \mu}^{2}+\sigma_{Q}^{2}D_{Q}^{2},\]  
where  
\[D_{S,\mu}^{2}=\left(\frac{x_{ij}^{2}}{d_{ij}}-\frac{x_{rs}^{2}}{d_{rs}}\right) ^{2}+\left(\frac{y_{ij}^{2}}{d_{ij}}-\frac{y_{rs}^{2}}{d_{rs}}\right)^{2}+ \left(\frac{z_{ij}^{2}}{d_{ij}}-\frac{z_{rs}^{2}}{d_{rs}}\right)^{2}\]  
and \(D_{Q}^{2}=\)  
\[\left(\frac{x_{ij}y_{ij}}{d_{ij}}-\frac{x_{rs}y_{rs}}{d_{rs}}\right)^{2}+\left( \frac{x_{ij}z_{ij}}{d_{ij}}-\frac{x_{rs}z_{rs}}{d_{rs}}\right)^{2}+\left(\frac {y_{ij}z_{ij}}{d_{ij}}-\frac{y_{rs}z_{rs}}{d_{rs}}\right)^{2}.\]  
For example, if \(x_{1}\) and \(x_{2}\) and \(x_{3}\) and \(x_{4}\) are the end points of diameters with \(d_{12}=d_{34}=d\), and \(x_{2}-x_{1}\) is parallel to the \(x\)-axis and \(x_{4}-x_{3}\) parallel to the \(y\)-axis, then \(u^{2}(d_{12}-d_{34})=2d^{2}\sigma_{S,\mu}^{2}\). By contrast, if the four points are rotated by \(45^{\circ}\), then \(u^{2}(d_{12}-d_{34})=\sigma_{Q}^{2}d^{2}\). If \(x_{2}-x_{1}\) is parallel to \(x_{4}-x_{3}\) and \(d_{12}=d_{34}=d\), then \(u^{2}(d_{12}-d_{34})=0\), showing that scale and squareness effects make no significant contribution to the uncertainty in calibrating a test length standard against a reference length standard of nominally the same length if the two standards are aligned parallel to each other.