Apparent Angular Diameter of a Sphere at Any Distance
PHP Program by Jay Tanner
This program computes the apparent angular diameter of a simple sphere at any distance from the eye as reckoned from the center or surface of the sphere.

The units are dimensionless, which means that 3250 units can mean whatever you decide, such as 3250 miles, kilometers, feet, meters, etc., just as long as both the radius and distance use the same units. 

The default initial values are the mean radius of the moon and its mean geocentric distance from Earth, both in statute miles.

Radius units
Distance units
Distance to the Eye Reckoned From:        Center           Surface 

Angular Diameter:

= 31' 04.158" = 31.069302' = 0.5178217008°

The distance (D) to the eye is reckoned from the center of the sphere.


The simple formulas defined below take into account the actual forward curvature of the spherical surface towards the eye and 3D perspective with respect to the eye point rather than treating the sphere as a flat circular disk 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 a spacecraft only a few thousands of kilometers or miles away rather than hundreds of thousands or more.

Only for great distances from the eye, can we treat a sphere as a flat circular disk, but for much closer distances, we need to account for the perspective to obtain the correct angular diameter.  The equations for this are actually quite simple and come from elementary trigonometry translated in a physical context.


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) to the eye point, as measured from the center of the sphere, the angular diameter () of the sphere as viewed from that point is:


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) to the eye point, as measured from the surface, the general equation for the angular diameter () of the sphere as viewed from that point is:

Jay Tanner - 2024