Loom

Loom is a zero-dependency module of various 2D- and 3D-graphics algorithms. Applying statistics, linear algebra, and physics, these algorithms output SVG commands for an SVG engine (e.g., your browser) to draw:

-4-3-2-101234-20-15-10-505101520

The integeral 22x5+4x3  dx\int_{-2}^2 -x^5 + 4x^3 ~~ {\text{d}}x.

abxncdgejks

A graph from a variation of Eades’s algorithm.

059.9561.9563.9565.9567.9569.9571.9573.9575.950.00.0500.100.150.200.250.300.350.40

A histogram.

123456789101112

A polar plot of esin(x)2cos(4x)+sin5(2xπ24){e^{\sin(x)} - 2\cos(4x) + \sin^5\left(\dfrac{2x - \pi}{24}\right)}

abecdfg

A binary tree from Knuth’s algorithm.

abweqlxfgyz

An HV tree.

00.511.522.5300.511.522.533.5

A scatter plot.

applebananamelonkiwidurian012345678910111213141516

A bar plot.

abhdmijef

A binary tree from the Reingold-Tilford algorithm.

5678910

A dot plot.

-10-9-8-7-6-5-4-3-2-1012345678910-10-9-8-7-6-5-4-3-2-1012345678910

A plot of f(x)=tan(x)f(x) = \tan(x) in R2.\reals^2.

abxhdmikjeuf

An nn-ary tree drawn from the Buccheim-Unger-Leipert algorithm.

200102002223.02003436.720041070200513702006150620071921200821512009239920102451201127342012288820133211

A line plot.

-5-4-3-2-1012345-5-4-3-2-1012345

Pseudo-randomized vectors.

3D plot of x2+y2.{x^2 + y^2.}