Skip to content

Conversation

@raphlinus
Copy link
Owner

Use the same technique as Vello stroke expansion to get Béziers to Euler spirals, but then subdivide to arcs.

Will probably be combined with #100 as a multifunction interactive diagram, but I wanted to get something quick and dirty up

This contains a prototype of Euler spiral based offset and flatten, and will become an interactive figure in the corresponding blog post.
WIP, points to pre-merge commit.

Also put NONE back on the group.
Apply robustness logic borrowed from main Vello dev: switch to derivatives, tweak derivatives to be nonzero, etc.

Also improve drawing of the Euler spiral in the 180 degree U-turn case; it was drawn as a single cubic segment which is fine for small angle deviations, but makes a colinear case. This drawing is very hacky but is sufficient for visual display.
Implement idea of converting Euler spirals to arcs using simple error metric. Visualize arcs in red, original curve in black.
Working drawing of parallel curves with good error. Missing cusp handling though.
Fix error underestimate for near-cusps.
More careful error measurement (making sure to match up arc length parameterization) lets us tighten the error bound for handling cusps.
This rolls up some changes for RustNL. The main substantive change is the additional slider for tolerance, but there's also some changes for style. I think this might also be the commit to snap to recent xilem_web, but I'm not 100% sure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants