Skip to content

tools: svg_path, and four experimental one-line drawings - #65

Merged
h0ffmann merged 1 commit into
mainfrom
tools/svg-path-drawings
Oct 15, 2026
Merged

h0ffmann merged 1 commit into
mainfrom
tools/svg-path-drawings

Conversation

@h0ffmann

Copy link
Copy Markdown
Owner

Task

Adopt the Hex package svg_path 3.1.1 in tools/ and try it on drawings in the house manner.

  • Licence: MIT (© 2026 John Steinberger, vistuleB/svg_path). MIT code can be used in AGPL-3.0-only tools.
  • Target: Erlang and JavaScript. Its only FFI is Erlang math and two small .erl files. It builds and runs on Erlang here.
  • tools/fabric drawings writes four original drawings to site/static/drawings/experiments/: viewBox 0 0 360 240, stroke 3.2, round caps and joins, no fill, a broken frame, and a <title> that says each is an original drawing in the manner of the drawings on picasso's site. No drawing traces or copies a work by Pablo Picasso. No card uses them yet.

How svg_path is used:

  • Build: arcs, cubics, quadratics, basic_shapes.circle/ellipse, and fit.subpath_from_parametric for the ouroboros's tapering body and the Archimedean spiral.
  • Transform: transform.rotate/scale/scale_xy/translate chained. The book's right page is the left page mirrored. The quill is rotated -28°.
  • Measure: bounds.path_bounding_box scales and centres each figure in the canvas. measure.subpath_length, point_at_length and derivative_at_length give the end of the body and its tangent, and the head goes there.

timeline.gleam is not changed. Its zig-zag and frame are integer M x y L x y strings. svg_path would add float conversions and a different serializer for no gain, and the output would no longer be byte-identical.

The drawings

ouroboros serpent spiral
ouroboros serpent spiral
quill open book
quill open book

These are rendered black on white for this page. The files use a white stroke, so they work as masks, the same as site/static/drawings/.

Proof

  • nix develop -c just check: exit 0.
  • cd tools && gleam test: 88 passed. The new tools/test/drawings_test.gleam checks the bounds of each drawing (8 units of margin inside the canvas) and the house attributes.
  • tools/fabric timeline --check: up to date.
  • Sources: no new citation.

Checklist

  • A fact changed in prose/ is changed in prose-ste/ and prose-pt-BR/ too (no prose change).
  • Every new Markdown file has its cite line (no new Markdown file).
  • A change to a hard rule links its change proposal (no hard rule changed).
  • A journal entry is added if this change met a challenge worth recording.

🤖 Generated with Claude Code

Adds the Hex package svg_path 3.1.1 (MIT, Erlang and JavaScript targets) to tools/.
`tools/fabric drawings` builds four original drawings with it (an ouroboros, a serpent
spiral, a quill, an open book) and writes them to site/static/drawings/experiments/:
figures from arcs, cubics and fitted parametric curves, centred by their exact bounds,
heads placed by path length and tangent. A test checks each fits the canvas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h0ffmann
h0ffmann merged commit 9080600 into main Oct 15, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant