Pen
Programmatic vector illustration engine emitting clean, Illustrator-ready filled SVG paths.
Code- and JSON-driven vector art engine that converts pressure/tilt strokes, tube limbs, cel shading, and procedural fills into plain filled SVG paths with zero strokes, masks, or clip-paths.
git clone https://github.com/BestRoiMedia/easel.gitWhy we built it
SVG clip-paths, strokes, and filters often break when imported into game animation pipelines or Illustrator. Pen computes all boolean clipping and variable-width stroke outlines in Shapely geometry so the output SVG is pure, flat paths.
Architecture & how it works
Evaluates parametric brush presets (effectors over pressure/tilt/velocity/random, Taubin stabilization, nibs, paper-grain textures) and geometric primitives (blob, tube, boolean ops), then runs lint and reference-alignment critique checks.
Key capabilities
- Variable-width ink strokes and parametric brush presets (charcoal, dry_ink, g_pen, watercolor, pencil)
- Bendable tube limbs with per-joint widths, rounded joints, and inner bend crease folds
- Directional cel shading, core shadows, rim light, and ambient occlusion bands
- Geometry-clipped procedural fills (hatching, cross-hatching, stipple, wood grain, stone, cloth)
- Built-in lint (check) and reference-overlay comparison (critique --ref) with IoU and Lab delta-E metrics
Usage example
python3 pen/cli.py draw ./scene.json --out ./out/art.svg --png ./out/art.png --scales 2
python3 pen/cli.py check ./out/art.svg --palette ./scene.json
python3 pen/cli.py critique ./out/art.svg --ref ./ref.png --out ./out/overlay.png