# Finding integer coordinates on a sphere's surface [duplicate]

Possible Duplicate:
Integer coordinate set of points that is a member of sphere surface

Assume $C$ is a sphere with radius $r$ and center in the origin (0,0,0). How can we find the set of all points with integer coordinates that lie on the surface of $C$?