Calculator: Parallax Triangles

Sunday, December 1, 2019 - 23:57 | Author: wabis | Topics: Geometry, Mathematics, Calculator
The presented Calculator can be used to calculate distances to objects from Parallax measurements. It also can be used for triangle calculations where we only know the baseline, an opposite angle and the point where the height meets the baseline. Also provided is the derivation of the used equations.


Different cases of triangles

Choose the correct triangle for your problem. Enter negative values for a or b if the corresponding arrow points to the left. If a or b is negative, the angle φ can geometrically not exceed a certain value. A message at Status tells you, if something is wrong with your input.

In parallax calculations the angle φ is very small. In this case we can use a simple equation to calculate an Approximation for s. The value at sapprox is calculated applying the simple approximation equation. The value s is the exact distance MC. The smaller φ the better the approximation.

Equations for x and s

The most difficult value to calculate is the height x. The other values can be calculated straight forward using simple trigonometry.

We can calculate the height x, given a, b and φ, in 6 steps:


To calculate the final result we have to distinguish some cases. Note that in some cases there is a second solution x'. The value x' of the second solution is always smaller than the main solution x. There is only a second solution if a or b are negative, in which case e > d. But if a or b is negative, there are only solutions for φ less than a certain limit, see Restrictions.


if φ > 0 and φ90°

if e > d and φ > 0 and φ90°

if φ > 90° and φ < 180°; no second solution

if φ = 180°; no second solution

if φ = 0°; no second solution

As we now know the height x, we can also calculate the distance s from the middle M of the baseline to the edge C with Pythagoras:



This equations are valid even if a or b are negative (H lies outside the baseline AB). But then there are some restrictions, which are automatically satified if you make no errors:

  • if a0 then b > |a|
  • if b0 then a > |b|

Which means that if the point H lies outside the baseline AB, so a or b is negative, then the other line segment is longer than the line segment with the negative value, which is automatically the case if you calculate a and b correctly as described above.

If a or b are negative or zero, then the angle φ can not exceed the following limit, unless you made a measurement error:

  • φ < arcsin( (a+b) / |ab| )

If any of this restrictions is not satisfied, the Calculator displays a corresponding error message.

Equations for the other Triangle Values

After we have calculated x, we can calculate all other values of the triangle by simple trigonometry and Pythagoras:

' =' 'inner angle at point A
' =' 'inner angle at point B

Approximation for s

In parallax calculations we have very small angles φ. In this case the equations above simplify to:

' =' '(a + b) = original baseline length
' =' 'parallax angle in radian, not degrees! radian = degrees · π / 180°
' =' 'angles from original baseline to point C

This value sapprox is also calculated by the Calculator for comparison with the exact value of s.

If the angles α and β are not the same, we have to rotate the baseline AB around the midpoint M, so that the angles α and β of the rotated baseline A'B' are equal and the angle φ is kept the same. The rotated baseline A'B' is shorter than the original baseline by the cosine term in (13) above:

' =' 'projected baseline length
' =' 'original baseline length
' =' 'angles from original baseline to point C

In parallax measurements the angles α and β are nearly equal if H lies between A and B and C is far away, so we can simply use the unrotated baseline length, because the cosine term is practically 1. So in practice we don't even need to know the angles α and β. This reduces the equation (13) to the often published simple form of the parallax equation:

' =' 'good approximation of the distance to the object
' =' 'baseline length
' =' 'parallax angle in radian, not degrees! radian = degrees · π / 180°

If the problem has 2 solutions, which is only the case if H lies outside AB, by using the measured angles α and β to the distant object at C you get automatically the right solution of the two possible.

Derivation of the Equations for x

Geometric Construction of Inscribed Angle

First we have to find all triangles with angle φ and baseline a+b. There are an infinite number of such triangles. The location of H gives us a second condition that has to be satisfied, which result in 0, 1 or 2 unique solutions.

All triangles that have the same baseline and angle φ lie inside a Circumscribed circle with an Inscribed Angle φ and a central angle 2φ as shown in the figure left. For the point C anywhere on the circle, the angle φ of any such triangle is the same.

To calculate the radius of this circle, we first need the line m, which is simply:


If we look at the magenta triangle on the right we can see that m over r is the sine of φ. As we know m and φ, we can calculate the radius of the circle:


To calculate the height x we build the magenta triangle MBZ and the cyan triangle ZCT. x depends on the sides d and e of this triangles. One solution is the sum x = e + d. But if a or b is negative, there can also be a second solution x' = ed, if e > d.

So lets calculate the magenta right angled triangle MBZ. We know 2 sides of the triangle, m and r. Using Pythagoras we can calculate the side e:


From the graphic we can see that m is always smaller than r, so this square root gives always real values.

From the cyan triangle ZCT we know the side r and the side c is simply:


Again using Pythagoras we can calculate the side d of this right angled triangle:


If we look at triangles ABC where a or b is negative, we can see that c = |mb| can get bigger than r for certain angles φ, in which case the square root has a negative argument and hence no real solution. So there are only solutions for angles φ and sides a and b, where cr. Lets see for which angles this is the case.

We have to expand this inequation:


The 2 on both sides cancel. Because φ in this cases is always less than 90° and greater than 0, the sine of φ is always positive. The condition, that for a negative a or b the other has to be greater in magnitude, we have assured that all terms of the inequation are positive. In this case we can rearrange the terms without invalidating the inequation and solve for sin(φ). And because the sine of φ < 90° is always positive, we can take the sine inverse (arcsin) on both sides:


So for triangles ABC with a < 0 or b < 0 the angle φ cannot exceed the value calculated with (22). The Calculator checks this condition and displays the maximal value for φ accordingly.

Validity Check

The following interactive graph confirms that the presented equations yield the correct results.

More Page Infos / Sitemap
Created Friday, November 29, 2019
Scroll to Top of Page
Changed Thursday, December 12, 2019