We could use a plain square cell grid for this, but automatically center the leave point and mask out the center cell(s).
When using a user-defined mask, we would need to use a circular projection of the cell coordinates onto the mask image.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Doable but gnarly in the details...
We can have a visible grid of C concentric circles of warped-rectangle tiles; C=min(width,height)/2. Each circle is a fixed amount bigger (in diameter) than the one it encloses. Going out from the center, each tile will connect to either one or two tiles in the next circle; going inward, it only connects to one. The split into two tiles happens when tiles would otherwise grow too wide; the Nth circle will have half as many tiles as the 2Nth circle. The number of tiles on any circle is 4(2**M), the innermost being a circle quartered into 4 tiles.
To map this to a rectangular cell grid, we divide the cell grid into 8 triangular octants. In an octant, starting at the center point, we group cells as follows, where "D-C" is a double-cell tile and "S" a single-cell tile:
D-C
S D-C
D-C D-C
S S S D-C
S S D-C D-C
S D-C D-C D-C
D-C D-C D-C D-C
S S S S S S S D-C
We see how the cells become too wide and subdivide into halves going from row (1) to (2), (3) to (4), and (7) to (8); generally, from (2**N)-1 to 2**N. Outward from a D-D, i.e. to the next numbered row, we only allow a path from C to D, or from D or C to any S. This means the tiles on a (2**N)-1 are effectively pentagons: they connect to one tile inward, two tiles outward, and two on the same circle.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We could use a plain square cell grid for this, but automatically center the leave point and mask out the center cell(s).
When using a user-defined mask, we would need to use a circular projection of the cell coordinates onto the mask image.
Doable but gnarly in the details...
We can have a visible grid of C concentric circles of warped-rectangle tiles; C=min(width,height)/2. Each circle is a fixed amount bigger (in diameter) than the one it encloses. Going out from the center, each tile will connect to either one or two tiles in the next circle; going inward, it only connects to one. The split into two tiles happens when tiles would otherwise grow too wide; the Nth circle will have half as many tiles as the 2Nth circle. The number of tiles on any circle is 4(2**M), the innermost being a circle quartered into 4 tiles.
To map this to a rectangular cell grid, we divide the cell grid into 8 triangular octants. In an octant, starting at the center point, we group cells as follows, where "D-C" is a double-cell tile and "S" a single-cell tile:
We see how the cells become too wide and subdivide into halves going from row (1) to (2), (3) to (4), and (7) to (8); generally, from (2**N)-1 to 2**N. Outward from a D-D, i.e. to the next numbered row, we only allow a path from C to D, or from D or C to any S. This means the tiles on a (2**N)-1 are effectively pentagons: they connect to one tile inward, two tiles outward, and two on the same circle.