Repository navigation
Phase 8a: spiral-tree flow map (flow_tree) - #27
Merged
Merged
Conversation
Add flow_tree(), an angle-restricted greedy spiral tree flow map (Verbeek, Buchin & Speckmann 2011). Unlike tnss_tree it needs no dummy nodes or triangulation, keeps the real node positions fixed, produces a planar (crossing-free) tree with smooth shallow-angle merges, and is tuned by a single restricting angle `alpha`. Returns per-edge spiral arcs with flow. Objectively validated on cali2010: the restricting angle holds exactly (max segment angle = alpha), the tree is planar (no crossings between non-adjacent edges across a range of alpha), all leaves connect to the root, and node positions stay fixed. tnss_*() remain as a legacy option. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Phase 8, part a (see
_docs/REFACTORING-PLAN.md§6/§9). The new, recommended flow map — addressing the maintainer's long-standing dissatisfaction with the TNSS output.What
flow_tree(object, xy, root, alpha = 40, n = 20)— a greedy angle-restricted spiral tree (Verbeek, Buchin & Speckmann 2011).data.frame(x, y, flow, edge), ready to plot.interp, no dummy nodes, no triangulation — a single knobalpha(the restricting angle).Why it's better than TNSS
gamma).Objective validation (on
cali2010)Rather than eyeballing, the tests assert the defining properties:
alpha(tested for α = 20/40/60).FAIL 0 | WARN 0 | PASS 93.Notes
tnss_*()kept as the legacy alternative (Phase 8c will fix its bugs).🤖 Generated with Claude Code