Git Product home page Git Product logo

bspline's People

Contributors

johntfoster avatar technologicat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bspline's Issues

Spline Boundary Behavior

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

Derivative values of points

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!

Matrix bug?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.