Mathematical algorithm for transferring grid cells

316727-screenshot-2020-10-01-100123.jpg

Follow the link I sent to see it in action. Or the quick pic to save you a click: