Help making an expanding grid system

image
A general idea on what i want to achieve ^^^
Dont know exactly how to do the math and dont know how i would find any documentation on it… In basic terms I am making a grid system for a game that makes a outward scan of an area and based on that Any help is appreciated

Have you found an efficient solution for this yet?