I think you should stay away from angles. You already have the direction of the vectors $\vec{e}_a$, $\vec{e}_b$, and $\vec{e}_d$ so you know that your vertices are going to be the vectors $a \vec{e}_a$, $b \vec{e}_b$, and $d \vec{e}_d$, in which $a$, $b$, and $d$ are lengths that you would like to compute. The sides of the rectangle are the vectors
$
\begin{aligned}
\vec{v}_{ba} &= b \vec{e}_b - a \vec{e}_a, &
\vec{v}_{da} &= d \vec{e}_d - a \vec{e}_a
\end{aligned}
$
and they should satisfy the constraints
$
\begin{aligned}
\vec{v}_{ba} . \vec{v}_{da} &= 0, &
\|\vec{v}_{ba}\|^2 &= L_{ba}^2, & \|\vec{v}_{da}\|^2 &= L_{da}^2.
\end{aligned}
$
Those are polynomials in $a$, $b$, and $d$ that you should solve. To make things simpler first rotate the direction vectors as in
$
\begin{aligned}
\begin{bmatrix}
e_a & e_b & e_d
\end{bmatrix}
=
Q R, \quad
Q^T Q = I, \quad
R =
\begin{bmatrix}
1 & r_{21} & r_{31} \\
0 & r_{22} & r_{32} \\
0 & 0 & r_{33}
\end{bmatrix}.
\end{aligned}
$
The constraints can now be expressed in terms of the rotated vectors
ea = {1, 0, 0};
eb = {r21, r22, 0};
ed = {r31, r32, r33};
as the equations
vba = b eb - a ea;
vda = d ed - a ea;
eqs = {
vba . vda == 0,
vba . vba == lba^2,
vda . vda == lda^2
}
which are
{(-a + b r21) (-a + d r31) + b d r22 r32 == 0, (-a + b r21)^2 + b^2 r22^2 == lba^2, (-a + d r31)^2 + d^2 r32^2 + d^2 r33^2 == lda^2}
Assuming that a suitable value of a is in hand, the second and third equations can be solved easily in terms of b and d because they are quadratic
solbda = Solve[eqs[[{2, 3}]], {b, d}]
The result is a list a rules with the four possible combinations of the two roots of each equation. For example, the first solution is
{b -> (a r21 - Sqrt[lba^2 r21^2 - a^2 r22^2 + lba^2 r22^2])/(
r21^2 + r22^2),
d -> (2 a r31 - Sqrt[
4 a^2 r31^2 - 4 (a^2 - lda^2) (r31^2 + r32^2 + r33^2)])/(
2 (r31^2 + r32^2 + r33^2))}
As for a suitable a, one can in principle substitute the solutions from b and d above into the first equation and obtain polynomials in a that need to be solved. A better route is to eliminate b and d directly from the system of equations, which can be done by calculating a Grobner Basis
gb = GroebnerBasis[eqs, {a}, {b, d}];
The result turns out to be a single polynomial in $a^2$ of order 4 whose coefficients
coeff = CoefficientList[gb[[1]], a];
coeff[[{1, 3, 5, 7, 9}]] // Simplify
are
{lba^4 lda^4 (r21 r31 + r22 r32)^4, -2 lba^2 lda^2 (r21 r31 +
r22 r32)^2 (lda^2 r22^2 (r31^2 + r32^2) +
lba^2 (r22^2 r32^2 + r21^2 (r32^2 + r33^2))),
lda^4 r22^4 (r31^2 + r32^2)^2 +
lba^4 (r22^2 r32^2 + r21^2 (r32^2 + r33^2))^2 +
2 lba^2 lda^2 r22^2 (r22^2 r32^2 (-r31^2 + r32^2 - r33^2) +
2 r21 r22 r31 r32 (2 r32^2 + r33^2) +
r21^2 (-r32^2 (r32^2 + r33^2) +
r31^2 (r32^2 +
2 r33^2))), -2 r22^2 r33^2 (lda^2 r22^2 (r31^2 - r32^2) +
lba^2 (-r22^2 r32^2 + r21^2 (r32^2 + r33^2))), r22^4 r33^4}
If there is one "formula" you are looking for then that is the one. Once you solve this polynomial for a, plug the values back into the solution for b and d to find which one is actually the solution to your problem. There may be roots that do not lead to solutions. Illustrating the process with your data:
AA = {-0.0359537, 0.0186775, 0.999179};
BB = {0.101493, 0.0185931, 0.994662};
DD = {-0.0359263, -0.0432848, 0.998417};
LAB = 5.76;
LAD = 2.438;
first calculate the rotation
M = Transpose[{AA, BB, DD}];
{Q, R} = QRDecomposition[M];
to obtain the vectors in R which in this case result in the matrix
$
\left(
\begin{array}{ccc}
1. & 0.990544 & 0.99808 \\
0. & -0.137195 & 0.0000416619 \\
0. & 0. & 0.0619372 \\
\end{array}
\right)
$
That is the data for your problem:
data = Join[Thread[{r21, r31} -> R[[1, {2, 3}]]], Thread[{r22, r32} -> R[[2, {2, 3}]]],{r33 -> R[[3, 3]], L1 -> LAB, L2 -> LAD}];
which I rationalize before calculating the polynomial roots
rdata = Rationalize[data, 1/1000000000]
to obtain
{r21 -> 41899/42299, r31 -> 32237/32299, r22 -> -(5923/43172),
r32 -> 1/24003, r33 -> 1871/30208, lba -> 144/25, lda -> 1219/500}
Next solve the quartic polynomial in $a^2$:
p = coeff[[{1, 3, 5, 7, 9}]] . {1, a2, a2^2, a2^3, a2^4};
sola2 = Solve[p == 0 /. rdata, a2];
sola2 // N
of which only the first two solutions are real and positive
{{a2 -> 1542.88}, {a2 -> 1543.69}, {a2 ->
1729.64 - 0.963126 I}, {a2 -> 1729.64 + 0.963126 I}}
The square-root of those are your candidate values for a:
sola = {{a -> Sqrt[a2 /. sola2[[1]]]}, {a -> Sqrt[a2 /. sola2[[2]]]}}
sola // N
which in this case are
{{a -> 39.2795}, {a -> 39.2898}}
The values of b and c can be calculated using the solution in terms of a obtained before. In this example the solutions are obtained by picking
{i, j} = {4, 1};
{a, b, d} /. solbda[[i]] /. sola[[j]] /. rdata // N
which leads to
{39.2795, 40.9419, 39.3622}
or
{i, j} = {3, 2};
{a, b, d} /. solbda[[i]] /. sola[[j]] /. rdata // N
which is
{39.2898, 36.8882, 39.3624}
One can verify that the solutions also work on the original data, as in
{i, j} = {4, 1};
{Sqrt[(b BB - a AA) . (b BB - a AA)], Sqrt[(d DD - a AA) . (d DD - a AA)], b BB - a AA) . (d DD - a AA)} /. solbda[[i]] /. sola[[j]] /. rdata // N
which produces the values
{5.76, 2.438, -4.93366*10^-6}
satisfying the three desired equations.
{A, A2B, A2D, AOB, AOD, B, BOD, D, OAB, OBD, ODA}. Even if you had only six, `Solve might not be able to handle this problem. Incidentally, a Weierstrass Substitution then might be helpful. – bbgodfrey Apr 20 '22 at 22:57AOB, AOD, BOD, A2B, A2Dare constants, not variables - so a solution in terms of them (and any other constants like pi, is what I'm looking for. – ezekiel Apr 21 '22 at 09:35{a, b, d}and then converted all instances of the three unknown angles toSinof those angles. Thus, the remaining three equations are polynomials in the threeSins. In all, it is a sixth order system, which I now am attempting to solve. – bbgodfrey Apr 21 '22 at 17:38Dis a protected system symbol, which you should probably avoid, along with other symbols beginning with a capital. – Michael E2 Apr 25 '22 at 16:04