What is a stadium segment?
A stadium segment is the piece of a stadium (a rectangle with a half disc of radius r on each of its two sides of length 2r) cut off by a straight line parallel to its straight sides. It is a circular segment of height h split down its middle, with a rectangle of width a and height h set between the two halves. One side is the straight cut, the long side l; the other side is two circular arcs with the straight top side a between them. Its two corners are the ends of the cut. It is mirror symmetric about the line through the middle of a and l. With h equal to r it is half of the stadium, cut along its axis.
How to use it
Type the radius r of the round ends, the height h from the cut to the straight top side, and the length a of that top side. The height can be at most 2r; at exactly 2r the cut only touches the stadium, and the page answers for the whole stadium with a note. A larger height is refused with a sentence that says why. The length unit is only a label: lengths come out in that unit and areas in its square. Radius r, height h and top side a must each be from 0.000001 to 1,000,000,000; a number may also be typed in exponent form such as 2.5e3. Anything else, including text, is refused with a sentence that says why, and so is a set of values that cannot form the shape.
Derivation of the formulas
The cut lies at distance r − h from the centres of the round ends (negative when the cut passes beyond them). Each half chord along the cut and the half angle φ of the circular segment follow from the right triangle of the radius:
$$ \frac{c}{2} = \sqrt{h(2r - h)}, \qquad \varphi = \mathrm{atan2}\!\left(\tfrac{c}{2},\ r - h\right), \qquad \theta = 2\varphi $$
atan2(y, x) is the angle of the point (x, y); it passes 90° when h is larger than r, so θ is right for every height. The piece is the rectangle a × h plus the two halves of the segment, and its outline is the cut l = a + c, the top side a and the two half arcs:
$$ A = ah + \frac{r^{2}}{2}\left(\theta - \sin\theta\right), \qquad P = l + a + r\theta = 2a + c + r\theta $$
With the opening values r = 5, h = 3 and a = 8: c/2 = √21 ≈ 4.582576, φ = atan2(√21, 2) ≈ 66.421822°, so θ ≈ 132.843643°, the arcs together measure ≈ 11.592795 and l ≈ 17.165151.
Worked example
The page opens with radius r (of the round ends) = 5, height h (from the cut to the straight top side) = 3, top side a (straight side between the two arcs) = 8. Then area A ≈ 43.816836; perimeter P ≈ 36.757946; long side l (along the cut) ≈ 17.165151; arc length (both arcs together) ≈ 11.592795. Each value is shown rounded once, from the computed number, to six decimals or to 12 significant digits, whichever is fewer; a value of 10¹² and more is written as its 12 significant digits times a power of ten, such as 1.23456789012 × 10¹⁵, since a computed number holds no more digits than that; a value below 0.0000005 is shown as its plain 12-digit number instead.
Frequently asked questions
What is the stadium segment with h equal to r?
The cut runs along the axis through the centres of the round ends, so the piece is exactly half of the stadium: a rectangle a × r with a quarter disc on each side.
Why is the chord not the long side?
The long side is the whole cut. It consists of the two half chords of the circular segment plus the bottom of the rectangle of width a, so l = a + c.
Why does the unit not change the numbers?
The calculator does not convert between units. Every length is read in the unit you chose, so the unit only labels the results; areas come out in that unit squared.
How accurate are the results?
Results are accurate to at least 9 significant digits for ordinary inputs. When a result depends on the small difference of two nearly equal entries (closer than one part in a million), fewer digits are reliable.
References
H. S. M. Coxeter, Introduction to Geometry, 2nd edition, Wiley, 1969
D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulas, 33rd edition, CRC Press, 2018