Assuming I have a point $P=(a_0,...,a_{n})\in\mathbb{R}^n$, and a vector $\vec{v}=(v_0,...,v_{n+1})\in\vec{\mathbb{R}}^{n+1}$. I would like to project the point $P$ onto $S^n$ by doing an inverse stereographic projection from the anchor $-{v}$ to projection of $P$ on the hyperplane perpendicular to $v$ and finally retrieve the point where this projection intersects with the sphere, $P'$.
A simple example for my question is: Given a point in $\mathbb{R}^2$ and a vector in $\mathbb{R}^3$ I'd like to project that point onto the 3D sphere (as in, inverse sterographic projection), with the projection happening in the direction of the vector, so the plane for the projection should be perpendicular to the vector.
I'm having all sorts of trouble:
If my hyperplane is given by $0=v_0x_0+v_1x_1+...v_nx_n$ (Since it's perpendicular to $v$), How do I find the projection of $P$ onto the new hyperplane? Do I need to find a transformation matrix somehow?
This source is the best I found for how to do the inverse sterographic projection, but there's no regard to the anchor, which leads me to believe it assumes the default anchor $(1,0,...,0)$. How can I do it with an anchor in a different spot? (Again, looks like it's just a matter of transforming the output)
Here's an attempt for a solution, but I'd need confirmation:
Assume some anchor is given by $-v_f=(1,0,...,0)$
The hyperplane is now $E_f=x_0=0\in\mathbb{R}^{n+1}$, and our point on this hyperplane would simply be $\hat{P}_f=(0,a_0,a_1,...,a_n)$
Calculate inverse stereographic projection given here, retrieve $P'_f$ on $S^n$
Assume $Av_f=v$ where $v$ is our v, get $A=vv_f^{-1}$
The point we need will now be given by $P'=AP'_f$
Feels like this should be right if we make enough assumptions (unit circle and unit vectors, that everything rotates easily, but I don't actually know how to prove if what I did is even remotely correct.