## Euclidean geometry in JS.

After seeing the incredible geometric designs throughout the Alhambra in
Granada, I wanted to try to explore some of the underlying symmetry and
geometry. I could have jumped straight to the tessellations, but it felt like
a deeper way to get into it would be to build up from basic constructions, and
so, over the course of a few train rides, I started with this little
library–**EuclidJS**–for building and rendering plane geometry scenes.
Code on Github.

Building the scene can be done programmatically with a simple API, or by describing the it with a (sort of) friendly grammar that Euclid can parse. The diagram above comes from the text below (which you can edit, at your own risk!).

## Next up:

- I’d still like to make the grammar more flexible (and thus concise), with, e.g., things like “Let d and e be the points where circles a and b intersect”, or even “Let v be the line determined by the points where circles a and b intersect”.
- A tessellation builder using this that will, hopefully, be simultaneously simple to use and true to the underlying geometry.
- A geometry proof parser that attempts to generate diagrams based on the text in a proof. (This is very ambitious, but would be very cool.)