I\'ve modeled a 3D earth with gridpoints, as below:
The points are represented in 3D space as XYZ coordinates. I then convert