By dkl9, written 2023-227, revised 2023-269 (1 revisions)

So you have a circle, out there in the physical world (as opposed to abstract-maths-land), which you want to measure. This might be a plate, or a wheel, or many other things.

You want to know the radius, or the diameter — they're basically the same, diameter being twice the radius.

So you put your ruler (equivalently, tape measure) across the circle, which gives you the diameter — or so you hope. You can't reliably align your ruler to the circle, unless the centre is marked (in which case, the rest of this document is moot). What you really end up measuring is not the diameter, but a chord (a segment between two points on the circle), which will always be shorter than the diameter.

(Most attempts would come closer than the exaggerated drawing here.)

That error can't be corrected just by scaling your measurement up by some constant factor. The mistake is different each time.

Notice that a proper diameter is locally perpendicular to the boundary of the circle. Most rulers have a short edge perpendicular to the measuring edge. If you align the short edge of the ruler to the boundary of the circle (that is, make it tangent), the measuring edge would then be a proper diameter.

This works, if you can do it right. This trick is hard for narrow rulers or small circles.

We know a simple relation between circumference and diameter: it's just a factor of `π`.
If you can measure circumference, you can convert that to diameter.

You can measure circumference by wrapping a flexible measuring tape around the circle, or a plain string which you mark to measure after removing.

This assumes you can wrap something taut around the circle. That doesn't always work. Plates with sloped lips, for example, would let string slide until it fits around the smaller inner disc, often even if you place it upside-down.

I found a way to measure diameter precisely from a crudely-placed ruler by putting all the precision in how you operate on measurements. All you need is a ruler — no tape measure, no careful dexterity — and a marker pen.

Here, I'll go thru the thought process that led to it. That will be very different from the process that serves as a rigorous proof.

I don't claim I'm the only one to devise a method like this — I haven't looked — but I thought of it independently.

What distinguishes a chord across the circle, measured by a poorly-placed ruler, from the true diameter? Obviously, their length — the chord is shorter. That can't help us here. We don't know the diameter; that's what we're trying to find!

The other thing we measure in geometry is angles, but here, when all we have is the circle and a chord, there are no angles to measure. Let's add some.

Among the basic theorems of 2D geometry is the inscribed angle theorem.
Changing it a bit from the way it's typically said: from some primary chord, make two secondary chords in the same circle so as to make a triangle.
Then the angle where the secondary chords meet each other will be the same regardless of how you place the secondary chords, so long as you keep them on one chosen side of the primary chord.
Basically, in the following diagram, angles `α` and `β` are equal.

(Yes, this will be useful here.)

Thales' theorem is a special case of this: when the chord is also a diameter, that consistent angle will be a right angle. If the chord is not a diameter (as in the diagram), the angle in the inscribed triangle will be either obtuse (greater than right) or acute (less than right), depending on which side the secondary chords are on. The angle's obtuse if the triangle's on the side of the chord with less than half of the circle's area. The angle's acute if the triangle's on the side with more than half of the area.

The inscribed angle differs more from a right angle as the chord differs more from a diameter. You'd apply the full version of the inscribed angle theorem to prove that. I'll treat it as an empirical fact here.

Now, by introducing a triangle, we can quantitatively distinguish measured chords from theoretical diameters.

I didn't ask you to bring a protractor, so you can't measure the inscribed angle directly.
You *can* measure it indirectly, by applying a relation between edges and angles in triangles.

This will require you to measure the edges (`a`, `b`, `c`) of an introduced triangle.
We want the angle `γ`.

Here's where the marker pen comes in: mark three points at the boundary of the circle, so that you can measure the edges between them consistently, rather than using three rulers at once as the diagram suggests. Well, you could use three rulers at once instead, if you're careful and really want to avoid marking the circle you're measuring. But with that much effort in the physical world, you might as well carefully align the ruler.

Another theorem, from trigonometry, tells us about the angle `γ`.
According to the law of cosines: `c`² = `a`² + `b`² - 2`a``b` cos `γ`.
Rearranging, cos `γ` = (`a`² + `b`² - `c`²) / (2`a``b`).
(I skipped over some algebra.
There's nothing new in there: just solve for cos `γ`.)

"But you wanted `γ`, not cos `γ`" you object.
"Why not go one step further and compute arccos((`a`² + `b`² - `c`²) / (2`a``b`))?"

We could do that, but that won't really help, as you'll see shortly.
For now, you'll just have to trust me that cos `γ` is what we *really* want.

Recall that the inscribed angles get further from a right angle as the chord deviates further from the diameter. In particular, a chord that's almost a diameter inscribes angles quite close to right ...

... and a chord that almost goes along the boundary inscribes one angle close to zero, and one nearly-straight angle (`π` radians).

To go from chord-length to diameter, we need to:

- multiply by something a bit more than 1 for an inscribed angle close to right (
`π`/2 radians) - multiply by a huge number for an inscribed angle close to
`0`or`π`radians - multiply by a moderate number for moderate angles

angle (rad) | factor |

0 | ∞ |

π/2 | 1 |

π | ∞ |

Look familiar? If you don't like infinities, you can try reciprocating the factors, making them divisors.

angle (rad) | divisor |

0 | 0 |

π/2 | 1 |

π | 0 |

There's a function that works like that. That's sine.

Recklessly matching a function like this from three input/output pairs is sketchy, but in this case, it turns out to work. You can trust this as an empirical fact, or look at the proof I made much later:

You measure the inscribed angle `γ` from a triangle extended from the chord.
`θ` is an angle in a right triangle for which the diameter is the hypotenuse and the original chord is the "opposite" side.
Sine = opposite / hypotenuse, so sin `θ` = `c` / `d`, and `d` = `c` / sin `θ`.
`γ` supplements (adds to `π` radians with) `θ`, and thus has the same sine.

Earlier, we computed cos `γ`.
How do we get the requisite sin `γ` from that?

sin² `γ` + cos² `γ` = 1, so sin `γ` = sqrt(1 - cos² `γ`).
We computed cos `γ` without trig functions, so we can get sin `γ` without trig functions.

Finally, the actual formula: given a triangle of chords with measured edges `a`, `b`, and `c`, the diameter of the circle is `d` = `c` / sqrt(1 - ((`a`² + `b`² - `c`²) / (2`a``b`))²).

That formula asymmetrically treats the three measurements differently, but there is no intrinsic asymmetry between how the three measurements were made.
So there *should* be a nicely symmetric version of the formula that gives the same answer.

Indeed there is.
I'll skip over the algebra here, but you can equally well get the diameter as 2`a``b``c` / sqrt((`b` + `c` - `a`)(`c` + `a` - `b`)(`a` + `b` - `c`)(`a` + `b` + `c`))

Go forth, mark a circle at three points, measure between them, and put in the numbers. Units don't matter, so long as you're consistent.

The diameter of the circle is ....