Recreate the sphere-filling algorithm described by Jean-Francois Ferellec