Can I find the position of B relative to A, seen from a different axis system?

66 Views Asked by At

I am not a mathematician in any sense of the word, so please bear with me. I have the points A and B on the surface of a sphere (the two green points in the image).

Point A (with some additional data) is used as basis for a different axis system. This system's "custom" XYZ-axes are shown as black dotted lines marked with X1(inside), Y1 and Z1, however: Origo is still at Origo (so, in hindsight, this is a poor representation). To clarify, the point (0,0,0) is the same point regardless of system.

Sphere

A rectangular area around A is marked. This area is projected onto a 2D image, as if a map of an area on a planet surface, with A as center, Z1 as up and Y1 as right. I know the width and height of the area in radians.

I would like to find how far away B is in radians around both the Y1- and Z1-axes. To put it this way, if a point C was placed somewhere inside the marked rectangle, I would need to know how many radians "left/right" and how many radians "up/down" it's away to correctly place point C on the 2D map.

Visualized here:

enter image description here

Any ideas? Or is this completely crazy?

If relevant, each of the four corners of the rectangle are found by traversing u and v rad away from point A (center), around the Y1- and Z1-axes respectively, and then projected on a 2D map. I guess this would result in some squishy 3D->2D projection issues, but at the scales we're using it's not a problem. However I guess it might be relevant to know this to properly place points B/C in the 2D system correctly.

Here's a gif to help you understand the perspective of the image enter image description here