I am trying to convert 3D coordinates ($\xi _{1}, \xi _{1}, \eta$) to a 4D position on a hypersphere using Hopf coordinates:
$x_{0}=\cos \xi _{1}\sin \eta \\x_{1}=\sin \xi _{1}\sin \eta \\x_{2}=\cos \xi _{2}\cos \eta \\x_{3}=\sin \xi _{2}\cos \eta $
Were $\eta$ runs over the range 0 to $\pi$/2 and $\xi _{1}$ and $\xi _{2}$ can take any values between 0 and 2$\pi$.
I have built an interactive interface in which moving a marker in 3D specifies the values for $\xi _{1}, \xi _{2}, \eta$ (with the resulting 4D vector normalised). However the program always stops working after short amounts of time.
I am really stuck trying to understand the relationship between $\xi _{1}, \xi _{2}$ and $ \eta$, and I think I'm missing something important but I'm not sure what. I'd really appreciate any insight you could offer me