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 curve offsetting #41

Open
bourgesl opened this issue Nov 20, 2021 · 2 comments
Open

Improve curve offsetting #41

bourgesl opened this issue Nov 20, 2021 · 2 comments

Comments

@bourgesl
Copy link
Owner

Ill-conditioned quad or cubic curves can have 1 to 5 curvature maxima... so the current basic approach in Stroker is really approximative for thick curves > 5px ...

In branch better-curves, new adaptative algorithms achieve high quality, but its performance can be improved for general use.

See https://github.com/bourgesl/marlin-renderer/tree/better-curves

EA releases:
https://github.com/bourgesl/marlin-renderer/releases/tag/v1_0_0_EA_3

This is the Marlin-renderer 1.0.0 Early Access release 2 release providing better curve rendering i.e. stroke width along the quad / cubic curves is more accurate.
See screenshots of improvements:

https://raw.githubusercontent.com/bourgesl/bourgesl.github.io/master/marlin-better-curves/computeOffsetCubic_fixed.png

https://raw.githubusercontent.com/bourgesl/bourgesl.github.io/master/marlin-better-curves/computeOffsetCubic_bug.png

more screenshots: at https://github.com/bourgesl/bourgesl.github.io/tree/master/marlin-better-curves

@bourgesl
Copy link
Owner Author

bourgesl commented Dec 4, 2021

See this bug report in 2021.11 on jdk11 & 17:
https://bugs.openjdk.java.net/browse/JDK-8277574

@bourgesl bourgesl moved this from In Progress to Hanging in @bourgesl FOSS TODO Dec 18, 2021
@bourgesl bourgesl moved this from Hanging to In Progress in @bourgesl FOSS TODO Sep 24, 2022
@bourgesl
Copy link
Owner Author

bourgesl commented Nov 4, 2024

To fix marlin's bezier quad or cubic issues, I found how to solve accurately:

So happy !

See
http://people.eecs.berkeley.edu/~wkahan/Math128/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

1 participant