2

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

grid

user3869231
  • 342
  • 1
  • 4
  • 19
  • 2
    The small square in the top left corner `(0,0),(0,6),(6,6),(6,0)` has side `7`, which is half the side of the big square rounded up `7 = (13+1)/2`. The diagonal of the small square, which is the side of the rotated square, has as many unit squares (diamonds) as its side. – dxiv May 22 '21 at 22:44

1 Answers1

1

User dxiv: "The small square in the top left corner (0,0),(0,6),(6,6),(6,0) has side 7, which is half the side of the big square rounded up 7 = (13+1)/2. The diagonal of the small square, which is the side of the rotated square, has as many unit squares (diamonds) as its side."

user3869231
  • 342
  • 1
  • 4
  • 19