I am looking for a way to sample points uniformly around a particular point on the unit sphere.
Working on spherical coordinates we can express any point on the unit sphere as $(\sin\theta \cos\phi, \sin\theta\sin\phi,\cos\theta)$. Say the initial point $r_0$ has coordinates $(\sin\theta_0 \cos\phi_0, \sin\theta_0\sin\phi_0,\cos\theta_0)$, I want to sample points uniformly over the solid angle of a cone around the initial point with an apex angle of $2\delta$ (see Figure below).
If the initial point is the north pole this is easy to do because $\phi$ can be taken uniformly as $2\pi \,\rm{rand}(0,1)$ and for $\theta$ the usual inverse transform method can be truncated to the desired range $(0,\delta]$ see wiki.
I don't know how to go around the general case though, I'd appreciate if anyone has some idea of how to attack this problem.
Thanks in advance!