An ellipse is an oval with two fixed points called foci. The sum of distances to the two foci is constant along the curve. In the two-body approximation, the central body lies at one focus, not at the ellipse's center. A circle is an ellipse whose foci coincide.
The semi-major axis a is half the ellipse's longest diameter. Eccentricity e measures its departure from circular shape. A circle has e = 0; bound ellipses have 0 ≤ e < 1. Periapsis is the closest point to the central body, and apoapsis is the farthest. Around Earth these are also called perigee and apogee.
An orbit with rₚ = 7,000 km and rₐ = 13,000 km has a = 10,000 km and e = 0.30. Its closest altitude above a mean-radius Earth is 629 km. The semi-major axis is the average of these two extreme radii, not the average of every radius sampled uniformly in time.
Recover the geometry before calculating motion
The center of an ellipse is its point of symmetry. A focus is a different point, displaced along the long axis. Let the distance from the center to either focus be c. The eccentricity is c divided by a. Moving from the attracting focus to the nearer end of the long axis covers a minus c; moving to the farther end covers a plus c. Substituting c equal to a times e gives the two apsis formulas above.
Adding the closest and farthest radii cancels the focus displacement. The sum is twice the semi-major axis. Subtracting them instead gives twice the displacement. Dividing that difference by their sum therefore gives eccentricity. This derivation explains why the formulas use center-to-spacecraft radii rather than heights above the surface. The focus represents the attracting center, not the nearest patch of ground.
Consider a different Earth example with periapsis radius 8,000 km and apoapsis radius 12,000 km. Their sum is 20,000 km, so a is 10,000 km. Their difference is 4,000 km, so e is 0.20. The focus displacement is 2,000 km. The two altitudes are 1,629 km and 5,629 km after subtracting Earth's mean radius. Reconstructing the extreme radii from a and e returns 8,000 and 12,000 km, checking the calculation.
If you instead average those altitudes, you obtain 3,629 km. That number is not the semi-major axis to insert into Kepler's period law. Adding Earth's radius restores 10,000 km. Using the altitude average directly would describe a much smaller mathematical ellipse, largely inside Earth, rather than the stated orbit. Carrying units is necessary, but units alone cannot distinguish a radius from an altitude because both are lengths.
Keeping a fixed while increasing e moves the near end inward and the far end outward by equal amounts. It does not simply enlarge every distance. In the demonstration, the long ellipse has a closest radius of 0.40a and a farthest radius of 1.60a. Its full major-axis length is still 2a, the same as the circular reference's diameter. The focus stays at the attracting body while the center of the ellipse shifts relative to it.
This provides a physical feasibility check separate from the geometry. If a were 10,000 km and e were 0.60 around Earth, the nearest radius would be 4,000 km, below Earth's surface. The equation still defines an ellipse, but a spacecraft could not coast around that entire path outside Earth. The widget uses normalized distances and enlarged central markers; it does not claim that every displayed eccentricity is a viable orbit at a particular Earth altitude.
Finally, eccentricity is a shape ratio, not a distance or a percentage of time spent near the planet. Two ellipses can both have eccentricity 0.30 while having very different sizes and periods. Conversely, two paths with the same semi-major axis can differ in shape while sharing a period. Keep size, shape, and physical clearance separate when deciding what a pair of numbers actually specifies.