Problem: 
However, an approximate solution may be obtained as follows. Given the vector difference $D_x(i,j) = X^w_r(i) - X^w_r(j)$, $D_y(i,j) = Y^w_r(i) - Y^w_r(j)$ $D_z(i,j) = Z^w_r(i) - Z^w_r(j)$ between two points $i$ and $j$ we can extend the equation given above as follows: \[ \hat{W}\hat{R} = \hat{V} \] where \[ \hat{W} = \begin{bmatrix}W&0 & 0 \\ 0 & X^w_r(i_1)& -X^w_r(j_1)\\ 0 & Y^w_r(i_1)& -Y^w_r(j_1)\\ 0 & Z^w_r(i_1)& -Z^w_r(j_1)\\\cdots&\cdots&\cdots\\ 0 & X^w_r(i_l)& -X^w_r(j_l)\\ 0 & Y^w_r(i_l)& -Y^w_r(j_l)\\ 0 & Z^w_r(i_l)& -Z^w_r(j_l)\end{bmatrix} \] where the "0"s represent blocks of zeros (submatrices) of the appropriate sizes, and $(i_k, j_k)$ represents the $k$-th pair of points between which the vector difference is given. \[ \hat{R} = \begin{bmatrix}R \\ 1 \\ -1\end{bmatrix} \] and \[ \hat{V} = \begin{bmatrix}V\\D_x(i_1,j_1) \\D_y(i_1,j_1) \\D_z(i_1,j_1) \\\cdots \\D_x(i_l,j_l) \\D_y(i_l,j_l) \\D_z(i_l,j_l) \end{bmatrix} \] We can now solve this as follows: Initialize $\hat{R}$. The above becomes a linear equation in $X^w_r(i), Y^w_r(i), Z^w_r(i)$, which can be solved via a pinv. Having estimated these points, solve for $\hat{R}$. Fix $\hat{R}$ and solve for $X^w_r(i), Y^w_r(i), Z^w_r(i)$. Iterate.
Alternately, we will assume the value of some points, as we do in part 3, where we assume that the nearest corners of all three grids ($XY$, $YZ$ and $XZ$ are at a known distance -- 7 cm -- from the corner.
We will give full marks to anyone who has identified this as a quadratic problem.