Library for manipulating and rendering non-uniform b-splines
Project description
bspy
Library for manipulating and rendering b-spline curves, surfaces, and multidimensional manifolds with non-uniform knots in each dimension.
The Spline class has a method to fit multidimensional data for scalar and vector functions of single and multiple variables. It also has methods to create circular arcs, ruled surfaces, and surfaces of revolution. Other methods add, subtract, multiply, and linearly transform splines, as well as confine spline curves to a given range. There are methods to evaluate spline values, derivatives, integrals, normals, and the Jacobian, as well as methods that return spline representations of derivatives, normals, integrals, and convolutions. In addition, there are methods to manipulate the domain of splines, including trim, join, reparametrize, reverse, add and remove knots, elevate and extrapolate, and fold and unfold. Finally, there are methods to compute the zeros and contours of a spline and to intersect two splines.
The SplineOpenGLFrame class is an OpenGLFrame with custom shaders to render spline curves and surfaces.
The DrawableSpline class converts a Spline to a curve or surface that can be drawn in a SplineOpenGLFrame. Only 1D and 2D splines can be converted.
The bspyApp class is a tkinter.Tk app that hosts a SplineOpenGLFrame, a listbox full of splines, and a set of controls to adjust and view the selected splines.
The bspyGraphics class is a graphics engine to display splines. It launches a bspyApp and issues commands to the app for use in jupyter notebooks and other scripting environments.
The full documentation for bspy can be found here, its GitHub project can be found here, a test suite can be found here, and a set of examples, including a jupyter notebook, can be found here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.