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$?
well. Finding the rational points by stereographic projection will tend to produce fractions that reduce to smaller denominators. Which may not matter to you, of course.
For $a^2 + b^2 + c^2 = 3 d^2 $ in integers, we find all primitive solutions with $\gcd(w,x,y,z) = 1,$ also $w+x+y+z$ odd, finally
$$ a = w^2 + x^2 - y^2 - z^2 + 0 \, w x - 2 w y + 2 x y + 2 w z + 2 x z + 0 \, y z $$ $$ b = w^2 - x^2 + y^2 - z^2 + 2 w x - 0 \, w y + 2 x y - 2 w z + 0 \, x z + 2 y z$$ $$ c = w^2 - x^2 - y^2 + z^2 - 2 w x + 2 w y + 0 \, x y + 0 \, w z + 2 x z + 2 y z$$ $$ d = w^2 + x^2 + y^2 + z^2 $$
The zero coefficients are on purpose, to keep the spacing.