Hexagon Geometry

The main shapes of the site logo are hexagons. I would like to programatically and reliably draw hexagons. I’m hoping to do this by deconstructing the six-sided polygon into a predictable right triangle. I’m not great at math so I’m not exactly sure this will be the most productive way to draw hexagons. If nothing else, we’ll document some misguided learnings.

Radii

We can start off with the basic geometric assumption that the total angles from the center of a circle is 360°. Since a hexagon has six sides, we can derive the six angles from the center of a hexagon:

360/6 = 60

That looks like this:

Connecting the terminus of these radii creates the six triangles of the hexagon:

Focusing on one of these single triangles and splitting it in half provides us with a right triangle:

Right triangle

Another geometric assumption we accept is that the total angles of a triangle will total 180°. Since we know one angle is 90° and one angle is 30°, we can deduce the final angle:

180-90-30 = 60

Now if we double that back up into the full shape, we find that each angle of the hexagonal triangles is 60°:

Now we can conclude that each triangle of the hexagon is a unilateral triangle. That is, all sides are of equal length. This means that the radius of the first circle we used to make the hexagon is also the length of each outside facet.

Now I just need to figure out how to use this information to draw a hexagon! 😅