johntfoster / bspline Goto Github PK
View Code? Open in Web Editor NEWPython/Numpy bspline implementation via Cox - de Boor
License: MIT License
Python/Numpy bspline implementation via Cox - de Boor
License: MIT License
Hello John, thanks for this little python module, and sorry if this finds you having forgotten all about it.
I am investigating using this module to implement b-splines rather than reinventing the wheel and I am encountering boundary behavior I don't expect. Given an instantiation of the class
knot_vector = [0, 0, 0, 0, 25, 35, 55, 65, 85, 85, 85, 85]
basis = Bspline(knot_vector,3)
basis.plot()
The final spline as x --> 85 approaches one. However, the value at 85 is zero. Is this expected? My understanding was that this value should actually be equal to one at the final spline
print(basis(84.999))
>>> [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
3.33333333e-14 4.99982778e-09 1.49987500e-04 9.99850007e-01]
print(basis(85))
>>> [ 0. 0. 0. 0. 0. 0. 0. 0.]
This is Python 3.5. Thanks for any insight
Hi, thanks for the great repo, can I obtain the derivative of a spline curve f(x)? For example f(x) = sin(x), how can I obtain the f'(x)=cos(x) by the provided API, thank you in advance!
Hi Johnt,
we are using your B-spline package in the framework of tackling parabolic differential equations.
Creating a spline matrix A using ‘collmat’ we find that the last entry (A_nn) is, just like the entire last row 0. Is this a bug? We expected the entire row to be 0, except for the A_nn element, which should be 1. (Just like the A_00 element is 1 and the rest of the A_0-row is 0). Right now we do some ‘artificial fixing’, i.e. setting A_nn to 1 manually.
The problem is also present in the 1st order derivative.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.