How can I work out the width and height of a hexagon

11,391

Solution 1

width should be 2*sideLength (sideLength = cos(60) * sideLength * 2)

height will be sin(60) * sideLength * 2 = sqrt(3)*sideLength

Solution 2

I'm rubbish at maths so Wolfram Alpha is my go to site for any formula questions: http://www.wolframalpha.com/input/?i=diagonal+of+hexagon

and it agrees with @jswolf19: sqrt(3) * sideLength

Share:
11,391
Admin
Author by

Admin

Updated on June 19, 2022

Comments

  • Admin
    Admin almost 2 years

    Each side is 60 degrees. and the top and bottom sides are horizontal

    I think width = (cos(60) * sideLength * 2) + sideLength = sideLength * 2

    This seems a bit off

  • rubenvb
    rubenvb about 13 years
    +1 for Wolfram Alpha = math.stackexchange.com evolved into AI.
  • Goz
    Goz about 13 years
    Actually if you check your link you'll see its 2 * sideLength ;)
  • django11
    django11 about 13 years
    @Goz: no, it offers three formula for the three possible diagonals from each vertex: s | sqrt(3)s | 2s - from the OPs question: height would be sqrt(3)s and width 2s
  • django11
    django11 about 13 years
    Umm, no... 2 * sin(30) = 1, so you're saying the height is the same as one sideLength!
  • Goz
    Goz about 13 years
    Sorry ... I'm being a muppet :D
  • Clifford
    Clifford about 13 years
    @GrahamS: Good point ;) I read "Each side is 60 degrees." in the original and took that to mean the size of the internal angle, without second guessing it, but of course the size of the internal angle is 120 degrees. Duly modified, but @jswolf19 already gave that in any case.
  • netpoetica
    netpoetica over 10 years
    Can you possibly update the formatting on this answer? I'm confused about that equal sine in front of cos(60) and also, I dont see how sin(6) * 5 * 2 = sqrt(3) * 5. It looks like you're trying to say there are two ways to do both, but both give different results.
  • jswolf19
    jswolf19 over 10 years
    @netpoetica, cos(60) = 1/2, sin(60) = sqrt(3)/2. Let me know if that doesn't clear it up, and I'll be a bit more verbose.