Repository navigation
tools: svg_path, and four experimental one-line drawings - #65
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
Adopt the Hex package svg_path 3.1.1 in
tools/and try it on drawings in the house manner.mathand two small.erlfiles. It builds and runs on Erlang here.tools/fabric drawingswrites four original drawings tosite/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:
basic_shapes.circle/ellipse, andfit.subpath_from_parametricfor the ouroboros's tapering body and the Archimedean spiral.transform.rotate/scale/scale_xy/translatechained. The book's right page is the left page mirrored. The quill is rotated -28°.bounds.path_bounding_boxscales and centres each figure in the canvas.measure.subpath_length,point_at_lengthandderivative_at_lengthgive the end of the body and its tangent, and the head goes there.timeline.gleamis not changed. Its zig-zag and frame are integerM x y L x ystrings. svg_path would add float conversions and a different serializer for no gain, and the output would no longer be byte-identical.The drawings
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 newtools/test/drawings_test.gleamchecks the bounds of each drawing (8 units of margin inside the canvas) and the house attributes.tools/fabric timeline --check: up to date.Checklist
prose/is changed inprose-ste/andprose-pt-BR/too (no prose change).🤖 Generated with Claude Code