The ray height h sets the height used to evaluate the marginal ray focus shift. The lens diameter D sets the drawing range (up to D/2).
Parallel rays at several heights (green = near-axis, red = marginal) / blue dashed line = paraxial focus f_p, orange dashed line = marginal focus f_marginal
For a plano-convex spherical lens (planar second surface), the paraxial focal length is given by the refractive index n and the radius of curvature R as:
$$f_\text{paraxial} = \frac{R}{n-1}$$The third-order spherical aberration at ray height h (the focus shift) is approximated by the following expression. Larger h gives a shorter focus.
$$\Delta f(h) = -\,f_\text{p}\,\frac{(n^2+2n-1)\,h^2}{8\,n\,(n-1)\,R^2}$$The marginal ray focus, longitudinal spherical aberration LA, and numerical aperture NA are:
$$f_\text{marginal} = f_\text{p} + \Delta f(h),\quad LA = f_\text{p} - f_\text{marginal},\quad NA = \frac{D/2}{f_\text{p}}$$Spherical aberration scales as h squared, a positive third-order aberration. The coefficient sign is negative, so the marginal focus f_marginal lies closer to the lens than the paraxial focus.