Skip to main content

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. Other methods add, subtract, multiply, and linearly transform splines. There are methods to evaluate spline values, derivatives, normals, and integrals, 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, reparametrize, 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.

bspyApp rendering the Utah teapot

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bspy-1.2.1.tar.gz (68.7 kB view hashes)

Uploaded Source

Built Distribution

bspy-1.2.1-py3-none-any.whl (60.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page