Apparent Angular Diameter of a Sphere At Any Distance
This program computes the apparent angular diameter of a sphere at any distance from the eye as reckoned from the center or surface of the sphere. Any convenient units may be used as long as the same units are used in common for both the radius and the distance. The default values are the mean Earth radius and the mean geocentric lunar distance in kilometers.
The general formulas used here take into account the actual curvature of the spherical surface with respect to the eye point rather than treat the sphere as a flat circle of the same radius as viewed from a distance. This is extremely important when viewing a sphere from relatively not too far away, such as a planet or the lunar surface as viewed from an orbiting probe only a few thousands of kilometers away.

Where the Distance to the Eye is Reckoned From the Surface of the Sphere:
Given the radius ( R ) of the sphere and the distance ( d ) of the eye point above the surface, the general equation for the apparent angular diameter ( ) of the sphere as viewed from that point is:
Where: R > 0 and d > 0


Where the Distance to the Eye is Reckoned From the Center of the Sphere:
Given the radius ( R ) of the sphere and the distance ( D ) of the eye point from the center of the sphere, the general equation to find the apparent angular diameter ( ) of the sphere as viewed from that point is:
Where: R > 0 and D > R
