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

Rational Bezier Curve Support #197

Open
pkuimyy opened this issue Apr 28, 2023 · 1 comment
Open

Rational Bezier Curve Support #197

pkuimyy opened this issue Apr 28, 2023 · 1 comment

Comments

@pkuimyy
Copy link

pkuimyy commented Apr 28, 2023

I want to calculate the derivative function of a rational bezier function. Have you considered to support rational bezier curve in this library?
Thank you for the document "A Primer on Bézier Curves" which helps me a lot.

@Pomax
Copy link
Owner

Pomax commented Apr 28, 2023

Hm, that's a good point. Adding a section for the derivative of the rational Bezier to the primer would be a good idea.

As for this library, it's kind of in need of a rewrite to make adding new code easier (or, "doable", really), and unless someone wants to fund that effort I have an embarrassingly high amount of other projects that all compete for my time and energy, with this one being pretty low on the list.

In the mean time, https://www.mn.uio.no/math/english/people/aca/michaelf/papers/bez.pdf should help, function (11) should let you compute the derivative fairly quickly (but pay attention to the notation, where P₀,₀ is the first point, P₀,₁ the second point, etc. and P₁,₀ the first point in the first de Casteljau iteration, P₁,₁ the second, P₂,₀ the first point on the second de Casteljau iteration, and so on and so on)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants