# How to calculate the area covered by any spherical rectangle?

Is there any analytic or generalized formula to calculate area covered by any rectangle having length $l$ & width $b$ each as a great circle arc on a sphere with a radius $R$?

Note: Spherical rectangle is a quadrilateral having equal opposite sides but non-parallel & all the interior angles are equal in magnitude & each one is greater than $90^\circ$.

• What do you mean by "rectangle"? Do you just want a quadrilateral, or some stronger condition? (Note that you cannot have four right angles in a quadrilateral on the sphere.) – Nick Matteo Mar 25 '15 at 13:16
• Yes, a quadrilateral having equal opposite sides (but not parallel) each as a great circle arc on a sphere. – Harish Chandra Rajpoot Mar 25 '15 at 13:21
• What do you mean by length and width? As the sides are not parallel, we don't have the usual idea of width and length. Do you simply mean the lengths of the sides? – robjohn Apr 4 '15 at 14:12
• Yes, length & width are simply the sides of the rectangle as great circles arcs on the spherical surface. – Harish Chandra Rajpoot May 28 '15 at 23:56

Assume we are working on a sphere of radius $1$, or consider the lengths in radians and the areas in steradians.

Extend the sides of length $l$ until they meet. This results in a triangle with sides $$w,\quad\frac\pi2-\frac l2,\quad\frac\pi2-\frac l2$$

The Spherical Law of Cosines says that \begin{align} \cos(A) &=\frac{\cos\left(\frac\pi2-\frac l2\right)-\cos\left(\frac\pi2-\frac l2\right)\cos(w)}{\sin\left(\frac\pi2-\frac l2\right)\sin(w)}\\ &=\frac{\sin\left(\frac l2\right)}{\cos\left(\frac l2\right)}\frac{1-\cos(w)}{\sin(w)}\\[6pt] &=\tan\left(\frac l2\right)\tan\left(\vphantom{\frac l2}\frac w2\right) \end{align} One quarter of the spherical excess of the rectangle is $D-\frac\pi2$ and $$\sin\left(D-\frac\pi2\right)=\tan\left(\frac l2\right)\tan\left(\vphantom{\frac l2}\frac w2\right)$$ Therefore, the area of the rectangle is $$\bbox[5px,border:2px solid #C0A000]{4\sin^{-1}\left(\tan\left(\frac l2\right)\tan\left(\vphantom{\frac l2}\frac w2\right)\right)}$$ Note that for small $l$ and $w$, this is approximately $lw$; and if $l+w=\pi$ (that is, the rectangle is a great circle), we get an area of $2\pi$ (one half the sphere).

Note the similarity to the formula for the area of a spherical right triangle with legs $a$ and $b$: $$2\tan^{-1}\left(\tan\left(\vphantom{\frac b2}\frac a2\right)\tan\left(\frac b2\right)\right)$$

• how did you render that graph? – frogeyedpeas Dec 20 '15 at 2:22
• @frogeyedpeas: That was rendered with Mathematica – robjohn Dec 20 '15 at 3:25

On a sphere of radius $R > 0$, a geodesic triangle with interior angles $\theta_{1}$, $\theta_{2}$, and $\theta_{3}$ has area $R^{2}(\theta_{1} + \theta_{2} + \theta_{3} - \pi)$. One way you might proceed, therefore, it to triangulate your geodesic polygon (whatever its actual shape) and sum the areas of its triangular pieces. For a quadrilateral with interior angles $\theta_{1}$, $\theta_{2}$, $\theta_{3}$, and $\theta_{4}$, the area is $$R^{2}(\theta_{1} + \theta_{2} + \theta_{3} + \theta_{4} - 2\pi).$$

Added (in light of OP's clarifications): If $\theta \leq \pi$ is the interior angle at each vertex of the quadrilateral, then $$\theta = \pi - \cos^{-1}\left\lvert\tan\frac{\ell}{2R} \tan\frac{b}{2R}\right\rvert,$$ so $$\text{Area} = R^{2}(4\theta - 2\pi) = R^{2} \left[2\pi - 4\cos^{-1}\left\lvert\tan\frac{\ell}{2R} \tan\frac{b}{2R}\right\rvert\right].$$ (Particularly, the absolute value of the product of tangents inside the arccos does not exceed unity.)

To see this, it's convenient to work in Cartesian coordinates with the sphere centered at the origin. Denote the vertices of the quadrilateral by $$v_{1} = (A, B, C),\qquad v_{2} = (A, -B, C),\qquad v_{3} = (A, -B, -C),\qquad v_{4} = (A, B, -C).$$ Of course, $A^{2} + B^{2} + C^{2} = R^{2}$.

The plane through the origin, $v_{1}$, and $v_{2}$ has equation $Cx - Az = 0$, and so has unit normal vector $$n_{1} = \frac{(C, 0, -A)}{\sqrt{A^{2} + C^{2}}} = \frac{(C, 0, -A)}{\sqrt{R^{2} - B^{2}}}.$$ The plane through the origin, $v_{1}$, and $v_{4}$ has equation $Bx - Ay = 0$, and so has unit normal vector $$n_{2} = \frac{(B, -A, 0)}{\sqrt{A^{2} + B^{2}}} = \frac{(B, -A, 0)}{\sqrt{R^{2} - C^{2}}}.$$

The "large" angle between these planes is the "large" angle between the great circles they determine (because each normal vector $n_{i}$ is tangent to the sphere at $v_{1}$), i.e., the interior angle $\theta$ of the quadrilateral. Taking the ordinary dot product of the unit normals, $$\cos\theta = n_{1} \cdot n_{2} = \frac{B}{\sqrt{R^{2} - B^{2}}}\, \frac{C}{\sqrt{R^{2} - C^{2}}}. \tag{1}$$

Let $2\psi_{1}$ denote the angle subtended at the center of the sphere by the side from $v_{1}$ to $v_{2}$, and let $\ell_{1} = 2R\psi_{1}$ denote the corresponding side length, so that $\psi_{1} = \ell_{1}/(2R)$. Thinking of $v_{1}$ and $v_{2}$ as vectors in space, the ordinary dot product gives $$\frac{v_{1} \cdot v_{2}}{R^{2}} = \cos(2\psi_{1}) = 1 - 2\sin^{2} \psi_{1}.$$ On the other hand, using the Cartesian components of these vectors, we have $$\frac{v_{1} \cdot v_{2}}{R^{2}} = \frac{A^{2} - B^{2} + C^{2}}{A^{2} + B^{2} + C^{2}} = 1 - 2\frac{B^{2}}{R^{2}}.$$ Equating, it follows at once that $B/R = \pm\sin\psi_{1}$. (As a consistency check, the isoceles triangle with the origin, $v_{1}$, and $v_{2}$ as vertices has apex angle $2\psi_{1}$ and base $2B$.)

Similarly, letting $2\psi_{2}$ denote the angle subtended at the center of the sphere by the side from $v_{1}$ to $v_{4}$, and letting $\ell_{2} = 2R\psi_{2}$ denote the corresponding side length, we find $C/R = \pm\sin\psi_{2}$.

That is, $$B = \pm R\sin\frac{\ell_{1}}{2R},\qquad C = \pm R\sin\frac{\ell_{2}}{2R}, \tag{2}$$ and consequently $$\frac{B}{\sqrt{R^{2} - B^{2}}} = \pm\tan\frac{\ell_{1}}{2R},\qquad \frac{C}{\sqrt{R^{2} - C^{2}}} = \pm\tan\frac{\ell_{1}}{2R}. \tag{3}$$

Substituting (3) into (1), $$\cos\theta = \frac{B}{\sqrt{R^{2} - B^{2}}}\, \frac{C}{\sqrt{R^{2} - C^{2}}} = \pm \tan\frac{\ell_{1}}{2R} \tan\frac{\ell_{2}}{2R}.$$ To get the large angle, either take the arccos of the negative value, or $\pi$ minus the arccos of the positive value. (The angle/area formulas above do the latter.)

• @HarishChandraRajpoot: You will need to know at least two of the angles of your quadrilateral to find the area, I think. – Nick Matteo Mar 25 '15 at 13:31
• I agree with @Kundor, I think. Consider analogous shapes in the plane. If all you know about the shapes in the plane is that two opposite sides have length $l$ and the other two have length $b,$ but not the angles, you cannot calculate the area. I think a more reasonable definition of spherical rectangle would, as user86418 says, require all four angles equal. – Randy E Mar 25 '15 at 13:39
• Yes, all four interior angles are equal in magnitude (but each is greater than 90 degree) – Harish Chandra Rajpoot Mar 25 '15 at 13:41
• So then the area is $r^2(4\theta-2\pi)$ if you know $\theta$. I feel like it should be possible to calculate $\theta$ based on $b$, $l$, and $r.$ – Randy E Mar 25 '15 at 13:48
• (+1) I am impressed that you arrived at the correct answer doing this with Cartesian coordinates, though the answer can be simplified using the identity $\frac\pi2-\cos^{-1}(\theta)=\sin^{-1}(\theta)$. However, using spherical trig makes things a lot simpler. – robjohn Apr 5 '15 at 9:59

Let the north-pole $N=(0,0,1)$ be the center of the rectangle, and the planes $x_1=0$, $\>x_2=0$ be its symmetry planes. Let the point $$P=(\cos\phi\sin\theta,\sin\phi\sin\theta,\cos\theta)$$ with $0<\phi<{\pi\over2}$, $\>0<\theta<\pi$ ($\theta=0$ at the north pole!) be one of its vertices. Then we see two rightangled spherical triangles, both with hypotenuse $NP$ of spherical length $\theta$, one of them with angle $\phi$ at $N$ and the other with angle ${\pi\over2}-\phi$ at $N$. The legs opposite these angles have spherical lengths ${a\over2}$ and ${b\over2}$ respectively, where $a$ and $b$ were given in advance.

Napier's rule for rightangled spherical triangles then give $$\sin{a\over2}=\sin\phi\sin\theta,\quad \sin{b\over2}=\cos\phi\sin\theta\ .$$ From these two equations one can compute $\theta$ and $\phi$, and other Napier's formulas then give the missing angles at $P$. Knowing all angles one obtains the area at once; see user86418's answer.

I believe it follows from this formula for spherical area of quadrangles on Wikipedia that the area should be $$4 \arctan\left(\sin\left(\frac b 2\right) \tan\left(\frac \lambda 2\right)\right),$$ assuming that the radius of the sphere is 1, where $$\lambda = \arccos\left(\frac{\cos(a) - \sin\left(\frac b 2\right)^2}{\cos\left(\frac b 2\right)^2}\right).$$ For this, we take an "equator" (a great circle) bisecting the quadrilateral through the sides of length $b$. We now have two congruent quadrilaterals; each has two right angles at the equator, and the other two angles are some $\gamma > \frac {\pi}{2}$. The Wikipedia formula for the area $E_4$ of these quadrilaterals should apply, with $\phi_1 = \phi_2 = \frac b 2$, $\lambda_1 = 0$, and $\lambda_2$ is the difference in longitude of an arc of length $a$ beginning and ending at latitude $\frac{b}{2}$.

To determine this, we use the formula for great-circle distance between points, and solve for the longitude difference $\Delta \lambda$.

For a sphere of radius $R$, divide every appearance of $a$ and $b$ by $R$, then multiply the result by $R^2$.

For a quick approximation, I recommend this simple approach (modified to remove degree conversion): link.

A = R^2*(sin(polar1)-sin(polar2))*(azimuth1-azimuth2)

• Effectively, you're just integrating cos(latitude) for the latitudes in question and then taking the appropriate portion of the result based on bounding longitudes. – barrycarter Dec 19 '16 at 17:24
• Correct, it's a quick approximation and should produce different results between the equator and the poles, as it does not account for great circle arcs. – Adam Erickson Dec 24 '16 at 23:38
• Oh, actually I was saying that it WAS completely accurate, just a much simpler way to get the same answer. – barrycarter Dec 25 '16 at 19:54