4 ms·
Stumbled into this world trying to make pretty Sankey diagrams. Offsetting beziers is much more complex than I anticipated.
by klysm 4y ago
Stumbled into this world trying to make pretty Sankey diagrams. Offsetting beziers is much more complex than I anticipated.
- sitkack 4y agoHow did that go? Making your own Sankey diagrams? Was it to learn or did you have another take on how they should be rendered. Ohhh, did you animate them? Were you rendering to SVG?
- klysm 4y agoMaking basic sankey diagrams with SVG is pretty easy but I have complex requirements that mean I can’t use a single path and thus can’t utilize the browsers stroking logic anymore.
- sitkack 4y agoI am curious of the domain and your Sankey advancement! Do they terminate at a multilevel object? Alpha blending? Dynamically updating? Inquiring minds want to know.
- klysm 4y agoWithout providing too much context (would take a while), I need more visual control than than what a SVG path can provide. Browsers are also inconsistent with how they handle sharp bends, which can cause artifacts in some cases. Essentially each edge in a graph im displaying is a sankey diagram.
- sitkack 4y agoOh cool, I think I get it. It is like a Pachinko Stankey. Or an output sum attribution graph. https://www.youtube.com/watch?v=7RTg89WEsXQ https://www.youtube.com/watch?v=7RTg89WEsXQ
- raphlinus 4y agoAn at least pretty good solution to computing parallel curves of Béziers is given in [1]. This can give very accurate results with a modest number of segments, using techniques that are fast to evaluate and not terribly complicated. I know it's possible to do better in terms of number of segments, but it's not obvious to me how to make that faster than doing curve fitting and error bounding. [1]: https://raphlinus.github.io/curves/2021/02/19/parallel-curves.html https://raphlinus.github.io/curves/2021/02/19/parallel-curve...
- klysm 4y agoThanks for the reference! The current solutions are a bit scattered around the internet. I wonder if it’s worth making a collection and comparison of approaches