I have a two-axis laser pointer. By using a couple of known points I would like to be able to have it point to any position in a square grid. Starting with a single axis motion can you please tell me if I would have enough information to solve for the angles of the pink dotted lines? I suppose if I had another point along the arc would help.
Here is a similar question. Estimation / Calibration of Transformation of 2DOF laser pointing system in 3D space
It makes sense to assume that the two axes are not independent but are articulated. I am going to attach a reference frame to each and relate their composition to the world coordinate system. The formula is standard and it is as follows
$p = d_1 + R_1 ( d_2 + R_2 p_2 ) $
where $p$ is the world coordinate position vector, d_1 , d_2 are offsets, and R_1, R_2 are rotation matrices, and $p_2$ is a position vector in the second frame coordinate system.
Now it is assumed that the laser beam is mounted on the second frame and has the equation of a line as follows
$p_2 = d_3 + \alpha v $
where $d_3$ is an offset and $v$ is the direction vector of the laser beam line of action, and $\alpha$ is an arbitrary scalar.
Therefore, the overall relation is
$ p = e + \alpha R v $
where
$e = d_1 + R_1 d_2 + R_1 R_2 d_3 $
$ R = R_1 R_2 $
Now suppose we have a square grid (a square of known side length $a$), and we manually point the laser beam at three of its corners $p_1, p_2, p_3$ where it is assumed that $p_1 p_2 $ is perpendicular to $p_2 p_3$ and $\|p_1 p_2\| = \|p_2 p_3\| = a $. It also assumed that the axes of the rotation matrix $R_1$ and $R_2$ are known, and for $p_1, p_2, p_3$ the angles specifying the rotation can be measured and are therefore known, so that for each of the three points the matrices $R_1, R_2$ are known exactly, although the coordinates of $p_1, p_2, p_3$ are not known.
Now we can write
$p_1 = e_1 + \alpha_1 R(\theta_1, \phi_1) v $
$p_2 = e_2 + \alpha_2 R(\theta_2, \phi_2) v $
$p_3 = e_3 + \alpha_3 R (\theta_3, \phi_3) v $
The unknowns in the above three equations are $\alpha_1, \alpha_2, \alpha_3 $ as well as the coordinates of $p_1, p_2, p_3$, however we can write the following equations in $\alpha_1, \alpha_2, \alpha_3 $
$\| p_1 - p_2 \| = a $
$\| p_2 - p_3 \| = a $
$ (p_1 p_2) \cdot (p_2 p_3) = 0 $
which are three independent quadratic (second degree) equations in the three unknowns $\alpha_1, \alpha_2, \alpha_3 $ and can be solved numerically (for example, using the Newton-Raphson multivariate method). Once these scalars ($\alpha_1, \alpha_2, \alpha_3$ ) are found, then the exact coordinates of $p_1, p_2, p_3$ (the corners of the square grid) are now known.
EDIT:
After numerically implementing the above scheme, I found that there can be multiple solutions for $\alpha_1, \alpha_2, \alpha_3$. Hence, $3$ points are not enough. We need the fourth corner of the square $p_4$, then we have
$p_4 = e_4 + \alpha_4 R(\theta_4, \phi_4) v $
And we can build a system of $3$ equations relating the vector $p_1 p_2 $ and $p_1 p_4$, namely,
$\| p_1 - p_2 \| = a $
$\| p_1 - p_4 \| = a $
$ (p_1 p_2) \cdot (p_1 p_4) = 0 $
Solving as before will generate solutions for $\alpha_1, \alpha_2, \alpha_4$ which is then cross matched with the previously obtained solutions for $\alpha_1, \alpha_2, \alpha_3$ and this will result in the true values for $\alpha_1, \alpha_2, \alpha_3, \alpha_4$.
Now any point on the grid is expressible as follows
$ p = p_2 + t (p_1 - p_2) + s (p_3 - p_2 ) $
If the grid is $N \times N$, then the $ij$-th grid point is found by setting $t = \dfrac{i}{N}, s = \dfrac{j}{N} $
Back to the basic equation relating the world coordinates with the local frames, we have
$ p = e + \alpha R v = d_1 + R_1(\theta) (d_2 + R_2(\phi) (d_3 + \alpha v) )$
From which it follows that
$ R_1(-\theta) ( p - d_1) - d_2 = R_2 (\phi) (d_3 + \alpha v) $
The vector $ p - d_1 $ is known, so the left hand side parameterizes a circle in $3D$, while the right hand side represents a hyperboloid of one sheet. The intersection (if it exists) can be found resulting in two possible values for $\theta$, and if we set
$W = R_1 (-\theta) (p - d_1 ) - d_2 $
then, we now have
$ R_2 (\phi) (d_3 + \alpha v) = W $
Therefore,
$ d_3 + \alpha v = R_2 (-\phi) W $
The right hand side describes a circle in $3D$ while the left hand side is just a straight line, which we know intersects the circle. The intersection can be found by intersecting the line with the plane of the circle resulting in $\alpha$, then $\phi$ can be solved for.