Visualization of lowering cubic Beziers to arcs#106
Draft
Conversation
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.
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.
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