From 3b7f11e4e17c521635aa608929922a287f431b66 Mon Sep 17 00:00:00 2001 From: TheKnarf <213777+TheKnarf@users.noreply.github.com> Date: Sat, 12 Jul 2025 20:36:06 +0200 Subject: [PATCH] Update Readme.md --- Readme.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Readme.md b/Readme.md index b24a63f..0e58cff 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -# Modular SVG Layout +# Modular SVG `modular-svg` is a small TypeScript library for generating SVG diagrams from a declarative scene description. It takes inspiration from the @@ -16,8 +16,6 @@ bun ./bin/modular-svg examples/planet.json planet.svg The CLI reads a JSON scene either from a file or from `stdin` and writes the resulting SVG to `stdout` or to the file specified as the second argument. - - ## Solver Architecture The layout solver is built around an approximate fixed-point method inspired by Bluefish. It parses a JSON tree of marks and relations, compiles it into numeric variables and simple operators, then runs a damped Picard iteration until the layout stabilizes. @@ -27,6 +25,3 @@ Parsing collects nodes such as `Stack`, `Align`, and `Distribute`, resolving ref At runtime the solver repeatedly applies all operators to a state vector. After each pass it computes the maximum difference between the old and new states. If this residual is below a tolerance `ε`, the system has converged. Otherwise the algorithm updates the state using a relaxation step `cur = cur + λ (next - cur)` with `0 < λ ≤ 1` to ensure stability. This iterative approach is efficient because each iteration touches only the affected variables. When the combined operators form a contraction—often the case with common layout primitives—the Banach fixed-point theorem guarantees convergence to a unique layout. Even when strict contraction is hard to prove, damping empirically leads to a stable solution. - - -