# Is it possible to only measure things on one axis, yet be able to derive a location on an orthogonal axis?

Consider a 3D printer with effector hung from 3 strings and a calibration piece as a single length, like the edge of an engineers rule. The position of the effector is defined by the 3 lengths. We do not know the location of the 3 supports, but we can measure the difference in each of the lengths at known points along the edge of the engineers rule.

A simpler scenario is to just consider one of the supports. So, the engineers rule and the support point define a plane and the measurement is only for the one support string. If we can only measure the difference in support length (a real) as we move only along a straight line (reals), then can we determine the location of the support?

I expected to be able to get the offset to the support point in the same axis as the measurements, but I did not expect to be able to calculate the distance to the support point on an orthogonal axis. I worked out some maths (see below). However, I cannot decide if:

1. My maths is wrong, and my intuition is right, or
2. My maths is right, and my intuition is wrong.

If it is 1, then I'd appreciate correction of my mathematics, and you would have the joy of spotting the goof up. If it is 2, then my intuition says there is value in considering the ramifications further, if the conclusion is not so well-known and obvious to a good mathematician.

Diagram in xz plane:

## The Maths

In quaternion form,

$$p_0=[0,0,0,0]$$

$$p_1=[0,200,0,0]$$

$$p_2=[0,500,0,0]$$

Treat anchor point as being on the xz plane, being

$$A=[0,x,0,z]=[0,−2000,0,2500]$$

The norm (or magnitude) of a quaternion $$q$$ is equivalent to its length, designated as $$|q|$$ and is a real number. So, the trivial cases are for the points

$$|p0|=0.0$$

$$|p1|=200.0$$

$$|p2|=500.0$$

The lengths $$d_n$$ from A to each of the three points are

$$d_{0} = | A - p_{0} | = | A | = \sqrt{ x^{2} + z^{2} }$$

$$d_{1} = | A - p_{1} | = \sqrt{ ( x - | p_{1} | )^2 + z^2 }$$

$$d_{2} = | A - p_{2} | = \sqrt{ ( x - | p_{2} | )^2 + z^2 }$$

Letting the difference between $$d_n$$ and $$d_0$$ be $$s_n$$, then also

$$d_1=d_0+s_1$$

$$d_2=d_0+s_2$$

So, from first set of $$d_n$$ equations,

$$(d_1)^2−(d_0)^2=( x - | p_{1} | )^2 + z^2 ) − (x^{2} + z^{2})$$

and from second set of $$d_n$$ equations,

$$(d_0+s_1)^2−(d_0)^2=( x - | p_{1} | )^2 + z^2 ) − (x^{2} + z^{2})$$

Expanding both sides, and cancelling out leaves

$$2 \cdot d_{0} \cdot s_{1} + {s_{1}}^2 = -2 \cdot x \cdot |p_{1}| + {|p_{1}|}^2$$

Solve for $$x$$ as a function of $$d_0$$

$$x = { { {|p_{1}|}^2 - 2 \cdot d_{0} \cdot s_{1} - {s_{1}}^2 } \over { 2 \cdot |p_{1}| } }$$

and solve for $$d_0$$ as a function of x

$$d_{0} = { { {|p_{1}|}^2 - 2 \cdot x \cdot |p_{1}| - {s_{1}}^2 } \over { 2 \cdot s_{1} } }$$

Repeating for $$p_2$$ also gives

$$d_{0} = { { {|p_{2}|}^2 - 2 \cdot x \cdot |p_{2}| - {s_{2}}^2 } \over { 2 \cdot s_{2} } }$$

So, using the two $$d_0$$ equations,

$${ { {|p_{1}|}^2 - 2 \cdot x \cdot |p_{1}| - {s_{1}}^2 } \over { 2 \cdot s_{1} } } = { { {|p_{2}|}^2 - 2 \cdot x \cdot |p_{2}| - {s_{2}}^2 } \over { 2 \cdot s_{2} } }$$

Solve for x,

$$x = { {s_{1} \cdot ({ {|p_{2}|}^2 - {s_{2}}^2 }) + s_{2} \cdot ({ {s_{1}}^2 - {|p_{1}|}^2 }) } \over { 2 \cdot ( s_{1} \cdot {|p_{2}| - s_{2} \cdot |p_{1}| }) } }$$

All the items on the right hand side are reals, with known values, thus we have a real value for x. So, we can get the value for $$d_0$$ using either of the earlier equations.

The z-axis is orthogonal to the x-axis, and we know the length of the base ($$x$$) and the hypotenuse ($$d_0$$). So,

$$\pm z = \sqrt{d_{ 0}^2 - x^2}$$

In general, there is no reason to deny either the positive or negative value of z. So, we can fully specify the location of the anchor point A as $$[0,x,0,+−z]$$ in quaternion form. In complex form the location is $$x+−zi$$.

## Verification

Using the values above for $$p_1$$ and $$p_2$$, the differences in length are measured as (well, calculated, for this example)

$$s_1 = 128.60304235291824$$

$$s_2 = 333.97178721631326$$

Substitute these and point locations into the equations for x and z above, and get that the anchor point is connected to the object at either -2000.00+2500.00i or -2000.00-2500.00i (rounded to 2 decimal places). In the practical environment of gravity, the strings do not hang up; they hang down. So, the result with the negative imaginary is discarded. This agrees with the given values of A, so the maths are consistent. But are they correct?

If correct, is it surprising that measurements made entirely in a single axis (or dimension) can give results about a point in an axis (or dimension) that is orthogonal to the measurement axis? That was my surprise, and dilemma. Comments welcome.

• In reality, a stepper motor winds the support string in and out. In particular, the effector is moved to p0, and the stepper count is set to zero, then the effector is moved to each of p1 and p2 and the step count is recorded at each. The effector has moved in in a straight line (nominated as the x-axis), and two measurements made at two known points on that axis. Yes, the situation is 2D, but the measurements are all 1D - and that's the bit that just surprised me. It just didn't match my intuition. So, have I made a mistake somewhere?
– user739278
Jan 29 '20 at 13:26
• From a mathematical point of view there is nothing unusual in your derivation: you have two measured quantities ($s_1$ and $s_2$) and two equations relating them to two unknowns ($x$ and $z$). Jan 29 '20 at 15:00
• Agreed @Aretino: there is nothing unusual in the derivation. I was concerned that I had made a mistake (I have been known to prove 1=2, by effectively dividing by 0 hidden in the maths!). I still have a niggle about measurements on a single axis giving data on an orthogonal axis. It's something about being connected. IMHO, there's something deep in this example, but I just don't know enough to even properly identify what is teasing me. Observations and comments are very welcome, still.
– user739278
Jan 30 '20 at 3:46
• I am not sure if this reference is relevant or not: nature.com/articles/s41566-019-0578-0. I don't have institutional access, and not paying just to explore. (Noted here, just in case.)
– user739278
Jan 31 '20 at 5:13
• I don't have access either, but I don't see how that paper could be even remotely related with your question. Jan 31 '20 at 10:16

When you measure distance $$s_1=d_1-d_0$$ you know that point $$A$$ is somewhere on the hyperbola with foci $$p_0$$, $$p_1$$ and $$2a=s_1$$ (red in figure below). When you measure distance $$s_2=d_2-d_0$$ you know that point $$A$$ is somewhere on the hyperbola with foci $$p_0$$, $$p_2$$ and $$2a=s_2$$ (green in figure below).
Point $$A$$ is then one of the intersections of those hyperbolas, which are four at most. But in this case there are only two intersections, symmetric about line $$p_0p_1p_2$$.