Mapping from ball into cube I need to give an example of continuous mapping from ball into cube (with condition that boundary is an image of boundary), but unfortunately I can't come up with it. Any useful advice will be welcome.

A systematic approach would be to decide to scale each ray through the origin by a linear factor that moves the ray's intersection with the unit sphere into the intersection with the "double-unit" cube.
For a nonzero point $(x,y,z)$, the intersection with the unit cube is
$$ \frac{1}{\max\{|x|,|y|,|z|\}}(x,y,z)$$
and in order to make points inside the sphere map to being inside the cube, we need to scale this by their initial euclidean norms, so we get the transformation:
$$ (x,y,z) \mapsto \begin{cases} (0,0,0) & x=y=z=0 \\[1ex]
\frac{\sqrt{x^2+y^2+z^2}}{\max\{|x|,|y|,|z|\}}(x,y,z) & \text{otherwise}
\end{cases}$$
One easily checks that the scaling factor $\frac{\sqrt{x^2+y^2+z^2}}{\max\{|x|,|y|,|z|\}}$ is the same everywhere on a ray.
This gives you the cube $[-1,1]^3$. If you want to end up with the usual unit cube $[0,1]^3$, apply the obvious affine transform afterwards.
