What is a sphere-cut rectangle?
A sphere-cut rectangle is the piece of a sphere's surface that lies straight above a rectangle. Take a sphere of radius r, lay a rectangle with the sides a and b in the plane through the sphere's centre so that the centres coincide, and cut the upper half of the sphere with the four upright planes through the rectangle's sides. The curved piece inside the four planes is the sphere-cut rectangle: seen from straight above it covers exactly the rectangle. Each cutting plane lies at the distance a/2 or b/2 from the centre, so it meets the sphere in a small circle, smaller than a great circle, and the four sides of the piece are arcs of these small circles. That makes it a different shape from the spherical rectangle, whose sides are arcs of great circles and whose corner angles are greater than 90°: here the four equal corner angles are less than 90°. The two diagonals, the great-circle arcs between opposite corners, are equal. The corners lie on the sphere as long as a² + b² is at most 4r²; when it equals 4r² they reach the equator of the half sphere.
How to use it
Type the sphere radius r and the two sides a and b of the rectangle. The page answers when a² + b² is at most 4r², including the case a² + b² equal to 4r², where the corners lie on the equator and the corner angle is 0; it refuses a larger rectangle with a sentence that says so. The length unit is only a label: lengths come out in that unit and areas in its square. Sphere radius r, rectangle side a and rectangle side b 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
Put the sphere's centre at the origin and the rectangle at |x| ≤ a/2, |y| ≤ b/2 in the plane z = 0. The piece is the surface z = √(r² − x² − y²) above it, and its corners (±a/2, ±b/2) lie on the sphere when their distance from the centre is at most r. With
$$ D = 4r^{2} - a^{2} - b^{2} $$
that is the condition D ≥ 0, decided exactly on the typed numbers; a corner is the point (a/2, b/2, √D/2). The plane x = a/2 meets the sphere in a circle of radius rₙ about the point (a/2, 0, 0), and the plane y = b/2 in a circle of radius rₘ:
$$ r_{n} = \sqrt{r^{2} - \frac{a^{2}}{4}}, \qquad r_{m} = \sqrt{r^{2} - \frac{b^{2}}{4}} $$
Along the side n the circle turns from its top point to a corner by the angle whose sine is (b/2)/rₙ and whose cosine is (√D/2)/rₙ, so the side subtends twice that angle, and the same holds for the side m:
$$ n = 2r_{n}\arctan\frac{b}{\sqrt{D}}, \qquad m = 2r_{m}\arctan\frac{a}{\sqrt{D}}, \qquad P = 2m + 2n $$
The opposite corners (a/2, b/2, √D/2) and (−a/2, −b/2, √D/2) are √(a² + b²) apart, at the height √D/2, so the great-circle arc between them, the diagonal, has the central angle θ with tan(θ/2) = √(a² + b²)/√D. At a corner the side n leaves along the tangent (0, −√D/2, b/2) and the side m along (−√D/2, 0, a/2); the angle α between them follows from their dot and cross products:
$$ d = 2r\arctan\frac{\sqrt{a^{2} + b^{2}}}{\sqrt{D}}, \qquad \cos\alpha = \frac{ab}{4r_{m}r_{n}}, \qquad \alpha = \arctan\frac{2r\sqrt{D}}{ab} $$
Since ab/(4rₘrₙ) is greater than 0, every corner angle is less than 90°; it approaches 90° for a rectangle that is small compared with the sphere and falls to 0 when the corners reach the equator (D = 0, where each arctangent of an unbounded argument is 90°). The area is the integral of the surface element r/√(r² − x² − y²) over the rectangle:
$$ A = \iint\limits_{|x| \le a/2,\ |y| \le b/2} \frac{r\,dx\,dy}{\sqrt{r^{2} - x^{2} - y^{2}}} = 2r\left[a\arctan\frac{b}{\sqrt{D}} + b\arctan\frac{a}{\sqrt{D}}\right] - 4r^{2}\arctan\frac{ab}{2r\sqrt{D}} $$
The closed form is proved by differentiating it back: its mixed derivative ∂²A/∂a∂b is 2r/√D, which is the surface element at the corner, and it is 0 when a or b is 0, as the integral is. Since arctan(ab/(2r√D)) is 90° − α, the same formula reads A = 4r²α − 2πr² + 2r[a arctan(b/√D) + b arctan(a/√D)], which is the Gauss–Bonnet theorem for a piece bounded by four small-circle arcs: the small circles of the sides n bend away from the piece with the geodesic curvature (a/2)/(r·rₙ), those of the sides m with (b/2)/(r·rₘ). When the corners reach the equator the area becomes πr(a + b) − 2πr²: the half sphere less the four strips beyond the cutting planes, each strip of the area πr times its width (Archimedes' hat-box theorem).
The page evaluates these forms in 110-digit decimal arithmetic and rounds each result once. The independent check integrates the surface element numerically over the rectangle (tanh-sinh quadrature in both directions), measures the sides along their small circles, the corner angle from the two tangents and the diagonal from the corner points, and must agree with the closed forms to at least 28 digits on every test case.
Worked example
The page opens with sphere radius r = 5, rectangle side a = 6, rectangle side b = 4. Then area A (on the sphere) ≈ 26.617584; perimeter P (the four curved sides) ≈ 21.460364; curved side m (above each side a) ≈ 6.541392; curved side n (above each side b) ≈ 4.18879; diagonal d (great-circle arc between opposite corners) ≈ 8.054035; corner angle α (between the two curved sides at a corner) ≈ 70.893395°. 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
Is this the same as a spherical rectangle?
No. A spherical rectangle has four sides that are arcs of great circles and corner angles greater than 90°. The sides of a sphere-cut rectangle are arcs of small circles, cut by planes that miss the sphere's centre, and its corner angles are less than 90°.
Why is the area larger than a times b?
Every part of the piece is tilted against the plane of the rectangle, except the single point straight above the centre, so it is larger than its shadow, the rectangle. For a rectangle that is small compared with the sphere the two areas are nearly equal.
Which inputs does the page refuse?
A rectangle with a² + b² greater than 4r², since its corners would lie outside the sphere; text that is not a number; and lengths outside the range from 0.000001 to 1,000,000,000. Each refusal comes with a sentence that names the reason.
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?
Every result is computed in 110-digit decimal arithmetic, with π to 115 digits and the arctangent summed from its series until a term falls below 10⁻¹¹⁵; the three terms of the area formula can cancel, but by less than 16 digits for any input the page accepts, so every result keeps more than 90 correct digits and is rounded once to six decimals or to 12 significant digits, whichever is fewer. Every digit shown is correct for every input the page accepts.
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
H. S. M. Coxeter, Non-Euclidean Geometry, 6th edition, Mathematical Association of America, 1998
M. P. do Carmo, Differential Geometry of Curves and Surfaces, Prentice-Hall, 1976 (the Gauss–Bonnet theorem)