Finding the coordinates of congruent squares (side length d) to approximate the surface of a sphere (radius r)?

73 Views Asked by At

I have a sphere and I want to approximate it's surface with congruent, adjacent and not overlapping squares whose corner points should sit on the sphere's surface.

Sphere's radius: r
Squares' side length: d
Coordinate system: x to the right, y upwards, z to the depth
Position of sphere's center: (0,0,0)
Position of center of "first" square should be on the negative part of the z-axis

How to find the coordinates?

Background: I want to separate the very big "planet" file for the openstreet map data into small separate files. What I saw so far of existing solutions doesn't fit my purpose or setting - simple, fast and low cost with an accuary only to the same detail one would need looking at a classical city map or highway map.

Example values:
r = 6,378,137 m (which gives a circumference of about 40,075,017 m)
d = should be best match to 1000 m