# Uniform PDF of offset sphere

Note that throughout this I use the spherical mapping convention: $$(x,y,z) = (r\cos\phi\sin\theta,r\cos\theta,r\sin\phi\sin\theta)$$ I have derived that the uniform pdf for a sphere $$S_1$$ with radius $$\rho$$ and center $$(0,0,0)$$ is $$p_A(r,\phi,\theta) = \frac{\delta(r-\rho)}{4\pi\rho^2}$$. I want to translate this sphere by $$(0,\rho,0)$$ and find the corresponding pdf.

What I have tried is to rewrite the pdf in cartesian coordinates, that is: $$p_B(x,y,z) = \frac{p_A(r, \phi, \theta)}{|r^2\sin\theta|}$$ And translate it: $$p_C(x,y,z) = p_B(x,y-\rho,z)$$.

Then I believe that the pdf I am looking for is: $$p_D(r',\phi',\theta') = p_C(x,y,z)|r'^2\sin\theta'|$$.

I have $$r^2 = x^2 + (y-\rho)^2 + z^2$$, $$\cos\theta = \frac{y-\rho}{r}$$, $$r'^2 = x^2+y^2 + z^2$$, $$\cos\theta' = \frac{y}{r'}$$. Assuming that this is correct I get the relationship: $$r^2 = r'^2 - 2\rho r'\cos\theta' + \rho^2$$ $$\cos\theta = \cos\theta' - \frac{\rho}{r}$$

Is everything correct? Is this the correct expression for the pdf I am looking for? $$p_D(r',\phi,\theta') = p_A(r(r',\theta'),\phi,\theta(r',\theta'))\frac{|r'^2\sin\theta'|}{|r^2(r',\theta')\sin(\theta(r',\theta'))|}$$

Edit: Just for completeness I provide the derivation of the uniform pdf on the sphere centered at $$(0,0,0)$$ with radius $$\rho$$. Since I only want to have a constant probability over the surface of the sphere I can write $$p_A(r,\phi,\theta) = C\delta(r-\rho)$$. In order to derive the pdf normalization constant $$C$$ I integrate the pdf: $$\int_{0}^{2\pi}{\int_{0}^{pi}{\int_{0}^{\infty}{p_A(r,\phi,\theta)r^2\sin\theta dr}d\theta}d\phi} =$$ $$2\pi C\int_{0}^{pi}{\rho^2\sin\theta d\theta} =$$ $$4C\pi\rho^2 = 1$$ $$C = \frac{1}{4\pi\rho^2}$$

The denominator seems to be redundant, since it actually cancels out with the term $$|r^2\sin\theta|$$ in the numerator, which I forgot to add in the pdf it seems: $$p_A(r,\phi,\theta) = \delta(r-\rho)\frac{|r^2\sin\theta|}{4\pi\rho^2}$$.