Posts

Showing posts from May, 2020

Hexagons, or a Boa Constrictor Digesting an Elephant

Image
My initial self-challenge seemed simple enough: draw some hexagons.  Have you ever read the book "The Little Prince" by Antoine de Saint-Exupery, where the pilot draws a boa constrictor digesting an elephant, and everyone tells him he's drawn a hat?  That's how my it felt to draw hexagons in React Native.  All I had to do was keep re-imagining what a hexagon WAS, and drawing it became simple. I decided that I didn't want to import a hexagon library to draw my hexagons - instead I wanted more opportunity to play with React Native styling, and draw them that way.  I found a couple of articles online that represent a hexagon as 3 pieces: a rectangle with 2 triangles.  Here's one example .  "Cool," I thought.  "I can do that."  So I drew a hexagon. My First Hexagon However, I wanted to be able to dynamically change the hexagon's shape, which lead me to discover this website of geometry equations to calculate side measurements...