Solution of a quadratic diophantine equation I try to solve the Diophantine quadratic equation:
$$X^2+Y^2+Z^2=3W^2.$$ Obviously, there is a non-trivial solution: $(1,1,1,1)$. So I tried to apply Jagy's method: Solutions to $ax^2 + by^2 = cz^2$ .
I consider integers $t,p,q,r$ and the point $P=(1,1,1)$ of the sphere $X^2+Y^2+Z^2=3$. I look for a second point on the sphere in the form $(1+pt,1+qt,1+rt)$. That gives $p^2t+q^2t+r^2t+2p+2q+2r=0$. This implies that
$$\left(1-\frac{2p(p+q+r)}{p^2+q^2+r^2},1-\frac{2q(p+q+r)}{p^2+q^2+r^2},1-\frac{2r(p+q+r)}{p^2+q^2+r^2}\right)$$
is a rational point of the sphere $X^2+Y^2+Z^2=3$.    But what to do with that? Thanks in advance. 

This is called stereographic projection. It works in many interesting cases, and when the left hand side is an ellipsoid one gets nice positive definite denominators, always comforting.
Given a rational point $(S,T,U)$ with $S^2 + T^2 + U^2 = 3.$ We get a rational vector 
$$ X = (S-1,T-1,U-1).  $$
We find the least common denominator $\lambda \in \mathbb Z$ such that
$$ (\lambda(S-1),\lambda(T-1), \lambda(U-1)  ) = (p,q,r) \in \mathbb Z^3 $$
What is $\gcd(p,q,r)?$ If it is larger than $1,$ we can divide through by that to get a shorter integer vector. So, $\gcd(p,q,r)= 1.$ 
By construction, 
$$ (1,1,1) + \frac{1}{\lambda}(p,q,r) =  (1,1,1) + \frac{1}{\lambda} (\lambda(S-1),\lambda(T-1), \lambda(U-1)  ) =   (1,1,1) + (S-1,T-1,U-1) = (S,T,U)  $$
