I understand that you want to rotate a 3D dataset and place it on a sphere at a certain elevation and angle.
You can try these steps:
- Shift your 3D data so that its centroid is at the origin.
- Use “rotm” to rotate this centered data.
- Calculate the specific 3D Cartesian coordinates on the surface of the sphere that correspond to your given “sphereRadius”, “azimuth”, and “elevation”.
- Shift the entire rotated dataset by adding these calculated target coordinates to every point.
This moves the plane from the origin to its final desired location on the sphere's surface.