# mapping of a point from a sphere into UV plane

I am reading the book An introduction to raytracing by Eric Haines and it mentions an algorithm to map a point from a sphere into a UV plane, it calls it Inverse Spherical Mapping (page 49). I googled a lot about this term and could not find a single piece of information regarding it.

Given the normal to a point on a sphere (Sn) and the sphere's north pole unit vector (Sp) and a unit vector from the sphere's origin to the sphere's equator (Se) as shown below Using the right-hand coordinates system. It drives the following formula for v and u I understand the Dot product yields cosine of an angle between two vectors, but why -Sn? from the picture v starts from the south pole and varies towards the north, but why the minus sign? (the book mentions v varies from -Sp to +Sp )

As for u I am not sure why we do divide by sine phi. and why do we take the cross product to determine u? (I know the cross-product gives us a perpendicular vector to both, which is probably used to know on which side the normal is, but I am not sure exactly how that worked as the equator is changing, so it can be both right and left)

• For the -Sn it has been sorted, the problem I had was I was using the left-hand coordinates system and the book strictly stated it was using right-hand coordinates (maybe my habit got me to keep using the left-hand coordinates) However, I still don't know how the cross-product is used here, or why the division with sin(phi) Jun 4, 2022 at 13:11
• $(\vec A \times\vec B) \cdot \vec C$ is the "scalar triple" product, the sign flips under inversion. Jun 5, 2022 at 9:57
• hmm that was a little cryptic the scalar triple product can be rewritten as $\left \| \vec A \times \vec B \right \| \left \| \vec C \right \| sin(\theta)$ Jun 5, 2022 at 10:09
• Thanks, I got it in the end, it seems to be a standard conversion from the spherical coordinate system. Jun 5, 2022 at 16:00 