Friday, July 29, 2011

Areas of Hexes

Thanks to a comments in a post here: http://trollsmyth.blogspot.com/2011/07/hex-mapping-part-2-scale.html I've realized I've been making a math error in calculating the areas of a hex.

I've been using the quick and easy formula of w *(w*.86) where w is the width of a hex from side to parallel side. It gets close to the right answer but it turns out it's wrong.

The more accurate formula is (3/2)*SQRT(3)*s^2 where s is the length of a segment around the perimeter of a hex.

So here's the areas in square miles and acres of various commonly used hex sizes using the more accurate formula.

Width of Hex.....area in square miles....area in acres................segment length
1 mile................. 0.844 .......................... 540 acres .......................... 0.57
3 miles............... 7.776 ............................ 4,966 acres ...................... 1.73
5 miles............... 21.549 .......................... 13,791 acres ...................... 2.88
6 miles............... 31.103 .......................... 19,905 acres ...................... 3.46
8 miles .............. 54.975 .......................... 35,184 acres ...................... 4.60
10 miles............. 86.497 ......................... 55,358 acres ....................... 5.77
12 miles............. 124.415 ......................... 79,625 acres ....................... 6.92
20 miles............ 345.39 .......................... 221,049 acres ..................... 11.53
24 miles............ 497.65 .......................... 318,496 acres ..................... 13.84
30 miles............ 777.578 ........................ 497,648 acres ..................... 17.30
36 miles............ 1119.713........................ 716,616 acres ..................... 20.76

I know lot's of numbers or not much return in heroic adventure but if you ever want to figure out the size of noble estates and compare to real world figures for farm and estate size the numbers come in handy.

Segment lengths are how long each hex side on the perimeter is as I measured them for those into the math.

14 comments:

  1. I can't express how helpful that is for me.

    I have been using sq. miles and acres as part of the farming calculations for the Domain Game (and now Borderlands) and only had the numbers for the 5 and 25 miles listed.

    ReplyDelete
  2. @ckutalik, glad you like it, and I hope you find it useful.
    How many acres do you figure to a person assuming moderately capable agriculture, good growing season and fertile land along with grazing of animals?
    I'm going with 2.5 acres to a person currently as a median.

    ReplyDelete
  3. I am turning it around and making it more about how much of the three big grain groups can be harvested per sq. mile cultivated.

    The scholarly work behind all this is so all over the map that it makes my brain bleed each time I pick up a new source.

    I am saying that an average harvest (and I have this modified by technology, climate, and magic available) will be about 7 bushels an acre with re-seeding--or about 4,480 bushels per sq. mile.

    Basically long story short that kind of harvest will feed 186 people. Which neatly almost works out to the 180/sq. mile that Ross uses in his medieval demographics work.

    ReplyDelete
  4. According to Chivalry and Sorcery 2nd edition, 2 acres in grain per person is reasonable. However with a 3 tier rotation system that means 6 acres of farm field per person. Pasturage equal to 500% of acres in grain are generally required but fallow fields also serve as pasturage, so I've always rounded to 10 acres of farmland per person, 64 per people square mile. Medieval scholars and C&S heads feel free to shoot this full of holes...

    ReplyDelete
  5. When you say "width of hex" in the chart above, how is that measured? I wouldn't normally think of "the length of a segment around the perimeter of a hex" as the width.

    ReplyDelete
  6. For those of use who measure (W)width like normal people =P (ie the distance from one side to the opposite side), the full calculation for the area is (√3)/2 * W^2.

    Obviously square3/two is where people get 0.86 from... technically if you round that answer you get 0.87 not 0.86, but better to use 0.866 or, ideally, a calculator with all the decimals. Perhaps that is where the errors come from? On a 15km Hex, using the more correct number results in 194.85km2, rather than 193.5 using 0.86*W^2.

    Hope that helps? =]

    ReplyDelete
  7. Oh wait, I've just noticed that my answers kind of match up with yours, which means your examples, whilst based on the side length, are still presented by hex width. ie there is still a discrepancy...

    Oh well. I'm just going to use this and blame any errors on bad surveying.

    ReplyDelete
  8. adding the segment sizes to the chart.

    3/2(√3) = 2.59807621135 according to my calculator.

    S in the formula is segment length on the hex perimeter, it's not based on the diameter or width.

    ReplyDelete
  9. I'd check your calculator: 3 < 2(√3) so 3/2(√3) must be less than 1.

    As for S: S = W/√3, so you can just substitute it into the side based equation to get a more useful equation based on a value we don't need to calculate.


    And one more thing: When rounding you round anything above 5 up, anything below 5 down and anything at exactly 5 to whatever value is even, (i.e. 1.5->2, 2.5->2, 2.5000000000000000000000000000001->3).

    ReplyDelete
  10. @Chakat.... the square root of any number over 1 is always going to be over 1.
    3/2 is also 1.5 so (3/2)(√3) is absolutely going to be over 1.

    ReplyDelete
  11. The brackets change the number:

    3/2(√3) = 0.866

    (3/2)(√3) = 2.60

    ReplyDelete
  12. lol...okie dokie....

    you do inside the parens first and then do the operations in order.
    3/2(√3) = 3/2*1.73205080757
    = 1.5 * 1.73205080757
    = 2.59807621135

    There was a formula going around on the internet a couple months ago that showed how people were taught do the order of operations changed the answer people would give(Which is where the lol comes from). You'll note when I retyped the formula bit portion again I put each part in parens to remove ambiguity.

    the area formula is ((3√3)/2)*t^2 where t is the length of a hex segment on the perimeter. Same formula as (3/2)(√3)*t^2.

    ReplyDelete
  13. Yes, I know about that formula. I also know that the 'right answer' most people give is wrong.

    The implied bracketing for "/" is the entire product to to the right[1]. This becomes even more true when you have a common form for an irrational number[2].

    3/2(√3) = 3/(2(√3))

    The confusion comes from people trying to treat an equation as if you were speaking a series of operations.


    Oh, you can stop obsessing over using the side length:

    (√3)/2*W^2 = ((3√3)/2)*S^2

    You can use the hex width directly, rather than using the width to calculate the side then using the side to calculate the area.


    [1] The need for implied bracketing is why using single line division signs is to be avoided and why you should always encase the entire division in brackets if you do have to use it.

    [2] √3 isn't an operation, it's a number. So is 2√3 with or without brackets around the √3.

    ReplyDelete
  14. @Chakat, I'm sure lot's of folks will find your comments rewarding for heroic adventure games.

    ReplyDelete