I have a unit sphere with points on its surface described by their azimuth and elevation. Azimuth is given as a number in $[0, 2 \pi]$, while elevation is a between $[-\pi/2, \pi/2]$.
I would like to rotate the sphere on the elevation axis (rotating by azimuth is trivial). For example, I'd rotate the sphere by $\pi / 2$ at azimuth 0, meaning that any point at azimuth 0 will be "elevated" by $\pi / 2$, while points on other azimuths will be elevated by a different amount depending on how far they are from the pivot point.
On the other side of the azimuth, at $\pi$, each point would be pushed down by $\pi / 2$.
What I'm after is the transformation formula for any point on the surface, for a given elevation angle and azimuth pivot point.
I'm having trouble working out the math for this. I have a version but I get false results. I'd really appreciate some help.