-
Notifications
You must be signed in to change notification settings - Fork 233
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
Catmull-Rom splines #4846
Catmull-Rom splines #4846
Conversation
Just a question. Did you take math from wiki? https://en.m.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline Your implementation looks different a bit visually. |
Yes, mathematics I took from wiki (evaluate_array method). I just regrouped some operations to minimize the number of calculations — for example, Mathematics for |
if tolerance == None is passed, then do not check that curve end points do coincide. However, it is still required to check that weights coincide (and rescale them), and some tolerance is required if remove_knots is used.
there is a typo in "Conversion Between Cubic Bezier Curves and Catmull–Rom Splines" by Soroosh Tayebi Arasteh, Adam Kalisz :/
Catmull-Rom splines have the following advantages:
But these splines also have some disadvantages:
This node supports two variants of Catmull-Rom spline:
Uniform (yellow) vs non-uniform (green) spline:
Non-uniform splines with Euclidean metric (yellow) and with centripetal metric (green):
Non-uniform (Euclidean) Catmull-Rom spline (yellow) vs Cubic spline (blue):
Uniform splines with different tension values: from 0.2 (almost black lines) to 2.0 (white line):
Preflight checklist
Put an x letter in each brackets when you're done this item: