MAPP - Board & Card Geometry Calculations - Copyright 2007, Hogwash Design. All Rights Reserved. (1) Hexagon Dimesions w |<----->| _ | / \ | / \ _ | | | | h | | | | s | | | _ | \ / _ \ / For regular hexagon of side 's', the above dimension are: w = 2.s.cos(30 deg) = s.sqrt(3).(1/2) = (1.732).s (approximately) h = s + 2.s.sin(30 deg) = s + 2.s.(1/2) = s + s = 2.s For some values of s: s w h -- -- -- 10 17 20 20 35 40 30 52 60 34 59 68 35 61 70 40 69 80 For our needs, we should be able to deviate slighty from these proportions without any issues. (2) Tiling Offsets w |<----->| _ _ | / \ | | / \ | | | | | Sep-V h | | | | | | | _ | \ / \ _ \ / \ | | | | | | \ / \ / |<->| Sep-H When tiling the hexagons, the separation offset from one hexagon to the one to it's bottom right is: Sep-V = h.(3/4) Sep-H = w.(1/2) (3) Board Dimensions vs Grid Size Bw |<------------------------------------>| C=1 2 ... NC _ | / \ / \ / \ | / \ / \ / \ | | | | | | | R=1 | | | | | | | | | | | | / \ / \ / / \ / | / \ / \ / \ / | | | | | | | 2 | | | | | | | | | | | | \ / \ / \ \ / \ | \ / \ / \ \ / \ | BH | | | / \ / \ / / \ / | / \ / \ / \ / | | | | | | | NR | | | | | | | | | | | | \ / \ / \ \ / _ \ / \ / \ / For a board with NC columns and NR rows, the board dimensions are: BW = NC.w + w/2 = w.(NC + 1/2) BH = NR.h.(3/4) + h.(1/4) = h.(3.NR + 1)/4 Assuming that the top-left corner of the bounding rectangle for the top-left hexagon is (0,0), the top and left for the hexagon in column C and row R is calculated as follows: Top = (R-1).h.(3/4) Left = (C-1).w + w/2 (when R is odd) OR (C-1).w (when R is even) (4A) Outer Board size and formula for s=40: For s=40: w=69->70 and h=80 Using NR=10 and NC=5, we get: BW = 70.(5 + 1/2) = 385 BH = 80.( (3).(10) + 1 ) )/4 = 620 And: Top = (R-1).80.(3/4) = (R-1).60 Left = (C-1).70 + 35 (when R is odd) OR (C-1).70 (when R is even) (4B) Inner Board size and formula for s=40: For s=40: w=69->70 and h=80 Using NR=8 and NC=5, we get: BW = 70.(5 + 1/2) = 385 BH = 80.( (3).(8) + 1 ) )/4 = 500 And: Top = (R-1).80.(3/4) = (R-1).60 Left = (C-1).70 (when R is odd) OR (C-1).70 + 35 (when R is even) (5A) Outer Board size and formula for s=34: For s=34: w=59->60 and h=68 Using NR=10 and NC=8, we get: BW = 60.(8 + 1/2) = 510 BH = 68.( (3).(10) + 1 ) )/4 = 527 And: Top = (R-1).68.(3/4) = (R-1).51 Left = (C-1).60 + 30 (when R is odd) OR (C-1).60 (when R is even) (5B) Inner Board size and formula for s=34: For s=34: w=59->60 and h=68 Using NR=8 and NC=8, we get: BW = 60.(8 + 1/2) = 510 BH = 70.( (3).(8) + 1 ) )/4 = 425 And: Top = (R-1).68.(3/4) = (R-1).51 Left = (C-1).60 (when R is odd) OR (C-1).60 + 30 (when R is even)