
Euclidean geometry in JavaScript - rhythmvs
http://euclid.js.org/
======
rhythmvs
Looking for something like GeoGebra†, but usable on the Web, I came across
this JavaScript library (which depends on d3.js to draw the SVGs). It’s
available for Node on npm‡.

What I especially like is the simple, declarative syntax, allowing to draw
geometry diagrams in the classic euclidian style, as e.g. in this constructive
proof: [http://euclid.js.org/parse.html](http://euclid.js.org/parse.html)

There are many charting libraries, all focussing on data visualizations and
statistical (or data-driven) plots. But a comprehensive library to draw
abstract geometry seems to be a desideratum still. There remains much to be
desired in this one, Euclid.js, too.

For example, if one would want to draw a diagram based on a rectangle of a
given proportion, then, with Euclid.js, the rectangle must be tediously drawn
from Euclidian primitives (point, intersection, line, circle, segment) first,
before one can actually start drawing the desired figure from there.

Ideally, the drawing library would have built-in convenience constructs for
frequently used geometrical figures such as a square, a root-two rectangle, an
isosceles triangle, an equilateral triangle, other regular polygons, methods
for bisecting a line segment, trisecting, etc. etc. And it would be really
nice, if relevant points would be labeled using a system of choice (ABC or
ΑΒΓ), and when significant features of the drawing would be shown (segments of
equal length marked, right angles, etc.).

† [https://www.geogebra.org/](https://www.geogebra.org/) ‡
[https://www.npmjs.com/package/euclid](https://www.npmjs.com/package/euclid)

