Constrain - a JS (ES6) library for animated, interactive web figures, based on declarative constraint solving

Triangle image


Interactive Pythagorean Theorem

Interactively computing centers of a triangle

Animated trees

Loyd 15-puzzle

Using constraints to compute the Golden Ratio (Drag the diamond!)

TeX-style text formatting

Cornell University course notes using Constrain for embedded figures: CS 2112, CS 4120/lexer generation, CS 4120/bottom-up parsing

Simple template page for using Constrain