I was coding a grid/coordinate system for a board game and needed to rotate a standard square checkerboard cells 45deg, so they are diamonds. I found out rotating the whole board produces the same result.
Doing this, I came across a pattern for rotating square grids to get a desired amount of diamonds.
Is there a deeper mathematic concept/relationship that describes this behavior I am seeing with the grid rotation?
5 - 3 = 2 ( 1 number between 5 and 3)
7 - 4 = 3 ( 2 between )
9 - 5 = 4 ( 3 between )
11 - 6 = 5 ( 4 between )
13 - 7 = 6 ( 5...)
15 - 8 = 7 ( 6...)
[Square grid size] - [# of diamonds] = [# of Diamonds - 1]
Or
[desired diamonds] + [desired diamonds -1] = [square grid size]
5 + 6 = 11