How can I calculate the solid angle that a sphere of radius R subtends at a point P? I would expect the result to be a function of the radius and the distance (which I'll call d) between the center of the sphere and P. I would also expect this angle to be 4π when d < R, and 2π when d = R, and less than 2π when d > R.
I think what I really need is some pointers on how to solve the integral (taken from wikipedia) $\Omega = \iint_S \frac { \vec{r} \cdot \hat{n} \,dS }{r^3}$ given a parameterization of a sphere. I don't know how to start to set this up so any and all help is appreciated!
Ideally I would like to derive the answer from this surface integral, not geometrically, because there are other parametric surfaces I would like to know the solid angle for, which might be difficult if not impossible to solve without integration.
*I reposted this from mathoverflow because this isn't a research-level question.