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

Derivative of a NURBS #21

Open
EliaStocco opened this issue Mar 28, 2021 · 2 comments
Open

Derivative of a NURBS #21

EliaStocco opened this issue Mar 28, 2021 · 2 comments

Comments

@EliaStocco
Copy link

Hello, I am writing my own library in Python for B-spline and NURBS.
Given a B-spline curve (degree P, N basis function, N+P+1 knots ) it is possible to express exactly its derivative with another B-spline (degree P-1, N-1 basis function, N+P-1 knots, i.e. eliminating the first the last knots).
Is it possible to make the analogous thing with NURBS?
How do you evaluate the derivative of a NURBS? Do you "generate" another NURBS or evaluate the derivative "numerically" i.e. with for example some finite difference algorithm.
Moreover, B-spline partial derivation is easily generalizable to B-spline surface, is it possible to do that for NURBS too?
Thanks

@rreusser
Copy link
Contributor

rreusser commented Mar 28, 2021

Hi! It seems perfectly plausible that the derivative of a b-spline is just a spline of lower degree, though it's not the approach I took. This library pretty directly applies the chain rule and evaluates the derivative directly (in any number of dimensions), rather than explicitly constructing that spline or opting for numerical differentiation. I was not able to nail down a reasonable expression for NURBS though. If I recall, the weights resulted in an explosion of the chain rule so that some other approach or form is probably required.

I don't have a copy myself, but I'd highly recommend The NURBS Book, which I think felt like was everyone's go-to reference for the low-level details.

Peter Boyer's verb library is also a very nicely done library that's far more ergonomic than this library, which was really aimed primarily at evaluating the core expressions in n dimensions as fast as possible.

@EliaStocco
Copy link
Author

Thank you very much

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

No branches or pull requests

2 participants