►V Reference

57.4 Paths🔗ℹ

A path is local semantic geometry. It contains ordered subpaths, and each subpath contains a start point followed by ordered line or cubic Bézier segments. Subpaths may be open or closed. A line segment stores its endpoint. A cubic segment stores two control points and its endpoint; its start is the previous point in the subpath.

Traversal order is also reveal order. Path length is measured in local world units. A closed subpath includes its implicit straight edge back to its start. Line length is computed directly from its endpoints. Cubic length is a deterministic approximation. Partial geometry selects an interval of the total ordered arc length and preserves cubic segments as cubic segments.

Path geometry does not contain world translation, Pict values, drawing contexts, or pixels. A path Visual combines local path geometry with an affine transform and style. morph-to interpolates paths that already have corresponding structure. morph-to-normalized first applies the limited cubic normalization described by path-geometry-normalize-for-morph. morph-to-aligned additionally selects closed-loop phase/direction before that normalization. morph-to-open-aligned selects the endpoint direction for one open source/destination pair before normalization. morph-to-open-compound-aligned globally pairs equal-count open subpaths and selects endpoint direction independently within each pair. morph-to-mixed-compound-aligned partitions compound correspondence by open/closed topology, globally pairs within each class, and then restores source subpath order before normalization. morph-to-topology-changing extends that correspondence with deterministic births/deaths when topology-class subpath counts differ. Birth and death seeds default to bounds centers; explicit shared local anchor points are also supported. Optional finite birth and death costs allow a poor real correspondence to be replaced by local collapse and regrowth even when topology counts match. Sparse per-subpath overrides select birth and death anchors and numeric costs using the original endpoint subpath indexes. Sparse additive real-match penalties use original source/destination index pairs. morph-to-compound-aligned first globally pairs equal-count closed subpaths and applies the same loop alignment within every pair. create and uncreate animate semantic partial paths. None of these operations animate a finished Pict.

transform-shape is the higher-level replacement operation for ordinary diagram shapes. It changes a present top-level Visual into a fresh destination Visual. Atomic built-in paths, circles, and rectangles use automatic outline correspondence; groups and other endpoint types use an intentional cross-fade fallback rather than claiming a contour correspondence they do not have.

transform-matching-visuals extends that operation over the leaves of ordinary group trees. It first honors explicit relative paths, then searches stable leaf paths and conservative built-in shape correspondence. Formula and glyph transitions retain their more specialized tagged-TeX matching API.