You can rotate around the y axis by changing θ and turning around the z axis, changing φ. However, the rotation around the X axis is a little stiffer.
One simple way would be to convert everything to Catian coordinates, rotate and convert back.
The equations for (x, y, z) (Cartesian spherical) are
x = r sin θ cos φ
y = r sin θ sin φ
z = r cos θ
(x, y, z) (x ', y', z ') x α
x' = x
= r sin θ cos φ
y' = y cos α - z sin α
= (r sin θ sin φ) cos α - (r cos θ) sin α
z' = y sin α + z cos α
= (r sin θ sin φ) sin α + (r cos θ) cos α
(r, θ, φ) (-)
r' = sqrt(x'2 + y'2 + z'2)
= r
θ' = cos-1(z'/r')
= cos-1(sin θ sin φ sin α + cos θ cos α)
φ' = tan-1(y'/x')
= tan-1(tan φ cos α - cotan θ sin α sec φ)
, , .