Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve rendering algorithm #15

Closed
cmyr opened this issue Jan 26, 2021 · 0 comments · Fixed by #21
Closed

Improve rendering algorithm #15

cmyr opened this issue Jan 26, 2021 · 0 comments · Fixed by #21
Labels
enhancement New feature or request

Comments

@cmyr
Copy link
Member

cmyr commented Jan 26, 2021

The current renderer converts the hyperbezier to a bézier path by arbitrarily subdividing it into 64 segments, and computing a cubic for each segment. This is a reasonable general-purpose solution, but is inefficient in many cases, where the path could be reasonably approximated by fewer segments.

@cmyr cmyr added the enhancement New feature or request label Jan 26, 2021
raphlinus added a commit that referenced this issue Jan 28, 2021
This replaces the fixed subdivision with a dynamic approach, and also
changes the parametrization to do a better job when tension goes up.
It's a bit hacky and heuristic, rather than being based on careful
tuning of parameters to approach an optimized rendering, but it should
be a big improvement over the current situation.

Fixes #15

Also closes #12 while I'm deep in the curve math.
This was referenced Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant