Let's take a $3$ dimensional sphere of radius $r$, such as $x^2+y^2+z^2 = r^2$.
For $r^2=1$, all the rational points of the sphere (i.e. points for which all coordinates are rational numbers) are characterised by
\begin{equation} x=\frac{2p}{p^2+q^2+1};y=\frac{2q}{p^2+q^2+1};z=\frac{p^2+q^2-1}{p^2+q^2+1} \end{equation}
with $p$ and $q$ rationals.
For $r^2 = 2$, using this method, one can show that
$$x=uz+1; y=vz+1; z=-2 {\frac {u+v}{{v}^{2}+{u}^{2}+1}}$$
with $u,v$ integers.
How would one do to find the rational characterisation when $r^2 = 3$?