What is a curved rectangle?
A curved rectangle is a rectangle with two opposite sides replaced by circular arcs that bulge outward; the other two sides stay straight. The two straight parallel sides, each of length b, are joined at each end by an arc of length l and radius r; both arcs are equal, their central angle α is at most 180°, and their centres lie on the middle line of the shape, parallel to the straight sides. The chord of each arc is the distance a between the straight sides. The shape is mirror symmetric about that middle line and about the perpendicular line through its centre. With α equal to 180° both ends are half circles and the shape is a stadium.
How to use it
Type the straight side b, then choose which two of the arc radius r, the arc angle α and the arc length l you know. The angle may be any value above 0° up to 180°; with l and r the arc length can be at most π·r, half a circumference: the length as you typed it, rounded to 12 significant digits, is compared with π·r rounded the same way, and equal values give half-circle ends (a stadium). A longer arc 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. Straight side b, arc radius r and arc length l must each be from 0.000001 to 1,000,000,000 and the arc angle α must be greater than 0° and at most 180°; 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
An arc of radius r and central angle α (in radians) has length l = rα; any two of l, r and α give the third. Its chord, which is the distance between the straight sides, and its height above the chord are
$$ a = 2r\sin\frac{\alpha}{2}, \qquad i = r\left(1 - \cos\frac{\alpha}{2}\right) = 2r\sin^{2}\frac{\alpha}{4}, \qquad h = b + 2i $$
The shape is the rectangle a × b with a circular segment of angle α added at each end:
$$ A = ab + 2\cdot\frac{r^{2}}{2}\left(\alpha - \sin\alpha\right) = ab + r^{2}\left(\alpha - \sin\alpha\right), \qquad P = 2b + 2l $$
With the opening values b = 10, r = 5 and α = 120°: l = 10π/3 ≈ 10.471976, a = 10 sin 60° = 5√3 ≈ 8.660254 and i = 5(1 − cos 60°) = 2.5, so h = 15. For a very flat arc (small α) the page evaluates α − sin α by its series, which keeps every digit.
Worked example
The page opens with straight side b = 10, arc radius r = 5, arc angle α (central angle of each arc) = 120°. Then area A ≈ 117.311783; perimeter P ≈ 40.943951; chord a (distance between the straight sides) ≈ 8.660254; arc height i (from a chord to its arc) ≈ 2.5; total length h (from arc top to arc top, along the straight sides) ≈ 15. 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
Can the arcs bend past a half circle?
No. The arcs end on the straight sides, and an arc of more than 180° would curve back over them; the arc angle is therefore at most 180°, where the shape becomes a stadium.
Why does the arc length not change the chord when r is fixed?
It does: with r fixed, a longer arc has a larger angle α and so a longer chord a = 2r sin(α/2), up to a = 2r at α = 180°.
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