Math on a Sphere client and server code