Question about rotation.

Hi,

Imagine I have a sphere as Earth that can be rotated around itself via drag and I have to put trees on this sphere. I’ve done my math and can access any position I want from the sphere with spherical/polar math.

For example, I can put a tree on top of the sphere.

Problem is placing trees on the sphere AFTER I’ve rotated it. To be more precise, the match puts trees on initial rotation of sphere and I can’t find a way to take the rotation into account.

Thanks

Self polite bump