People in StackOverflow seems not so into this theme, so I thought I could have better luck in here.
I had the idea of an spaceship game where the world is confined in the surface of an 4-D hypersphere (also called a 3-sphere). Thus, in seeing it from inside, it would look like a 3-D world, but by navigating in every direction, I would never leave the limited volume of the 3-sphere.
To represent the 3-shpere as a "flat" 3-D space, I use a stereographic projection, which is very simple to implement, just need to divide the point in the 3-sphere by one minus its w coordinate.
To represent the vertices of the objects I am using normalized 4D vectors, such that $x^2+y^2+z^2+w^2=1$, thus keeping them inside the 3-sphere.
The first problem to solve was rotation. But I soon figured out that ordinary 3D rotation matrices would suffice to rotate the world around the viewer in the 3D projection, since it does not mess up with the $w$ coordinate (pretty much like rotating a sphere around the z-axis would also rotate its stereographic projection).
Then I figured out that any rotation that included the $w$ coordinate would be equivalent of translation inside the 3D projection (just not commutative, as ordinary 3D translations on "flat" spaces), then I could translate along the axis by using a simple around axis rotation matrix $(x', y') = (x \ cos a - y \sin a, x \sin a + y \cos a)$, but varying $w$ along with another axis.
This is so far where I got, and I could not figure out how to navigate forward, based on the position the viewer is facing from the projection. I can apply the inverse transform to derive the normalized 4-D vector (called F) the viewer is facing in the hypersphere coordinates, but I don't know how to navigate in that direction by using a $4\times4$ matrix (what is optimal in OpenGL). I could think on a hackish solution: for every vertex $V$, $d V' = \text{normalize}(dF + V)$, where $d$ is the distance moved forward (in some strange unit I can not exactly precise). This way only works for small values of d, there is no direct correlation between d and the angle variation.
Thus the question is: how to move forward (using a $4\times 4$ matrix transform) being in the surface of a 4-D hypersphere? In other words: if I am at $(x, y, z, w)$ now and want to be at $(x', y', z', w')$ next (both vectors of norm 1), how can I derive M such that $M \times (x, y, z, w) = (x', y', z', w')$ ?