In the 3-sphere simulator I am building, the viewpoint is contained in the space of a 3-sphere (the surface of a 4-D hypersphere), and the user is able to navigate through it.
There are some polyhedra floating in this space. They are represented as connected 4-D euclidean points, every point $P$ so that $|P| = 1$, what keeps the shape contained in the 3-sphere of radius $1$.
I am able to rotate and move those objects around by using $4\times4$ rotation matrices, that also ensure that the objects are kept in the space. (See the relevant question here).
Now I am in the point that I need to scale the objects. I know I can't simply use a 4x4 scale matrix, because that would take the points off of the 3-sphere. I need some way (that is not too computationally intensive) to scale the object linearly to the great-circle distance between the polyhedron point and its origin.
So I have the polyhedron point $P$ and the origin $O = (0, 0, 0, -1)$, both 4-D euclidean points. Then I need $P'$ so that: \begin{align} &P' = SphereScale(P, factor) \\\\ &CircleDistance(P, O) = factor \times CircleDistance(P', O) \end{align}
The radius of the 3-sphere is always 1.
I do not know what it is this $SphereScale$ function, nor I am sure how to calculate this $CircleDistance$. I am aware that after certain size, the polyhedron starts to shrink to the other opposite half of the 3-sphere, so to collapse in the symmetric opposite point of its origin – that should be $(0, 0, 0, 1)$. What can you tell me about that $SphereScale$ function or the whole effect I want to obtain?
Sorry if I could not express myself very clearly. I am more of a programmer than a mathematician.