This project implements Non-Uniform Rational B-Spline (NURBS) curve and surface computation algorithms in native Python with minimum possible dependencies. The package contains 3 modules:
BSplinecontains Non-Uniform B-Spline (NUBS) algorithmsNURBScontains Non-Uniform Rational B-Spline (NURBS) algorithmsCPGencontains simple control points grid generation algorithms
BSpline and NURBS modules contain 3 classes for geometric evaluation:
- Curve for evaluating 3D curves
- Curve2D for evaluating 2D curves
- Surface for evaluating surfaces
CPGen module contains 2 classes for grid generation:
- Grid for generating inputs for
BSpline.Surfaceclass - GridWeighted for generating inputs for
NURBS.Surfaceclass
I would be glad if you cite this repository using the DOI provided as a badge at the top.
Included setup.py script will take care of the installation and automatically copy the required files to site-packages directory. Please run the following from the command line: python setup.py install
If you don't want to put the files into your Python distribution's site-packages directory for some reason, you can run python setup.py develop from the command line to generate a link to the package directory inside site-packages.
Please see NURBS-Python Examples repository for examples.
NURBS-Python currently implements the following algorithms from The NURBS Book (2nd Edition) by Piegl & Tiller:
- Algorithm A2.1: FindSpan (page 68)
- Algorithm A2.2: BasisFuns (page 70)
- Algorithm A2.3: DersBasisFuns (pages 72,73)
- Algorithm A3.1: CurvePoint (page 82)
- Algorithm A3.2: CurveDerivsAlg1 (page 93)
- Algorithm A3.3: CurveDerivCpts (page 98)
- Algorithm A3.4: CurveDerivsAlg2 (pages 99,100)
- Algorithm A3.5: SurfacePoint (page 103)
- Algorithm A3.6: SurfaceDerivsAlg1 (pages 111,112)
- Algorithm A4.1: CurvePoint (page 124)
- Algorithm A4.2: RatCurveDerivs (page 127)
- Algorithm A4.3: SurfacePoint (page 134)
- Algorithm A4.4: RatSurfaceDerivs (pages 137,138)
- Algorithm A5.1: CurveKnotIns (page 151)
- Algorithm A5.3: SurfaceKnotIns (pages 155-157)
Please use the issue tracker for reporting bugs and other related issues.
If you have any questions or comments related to the NURBS-Python package, please don't hesitate to contact the developers by email.
- Onur Rauf Bingol (@orbingol)
I would like to thank all contributors for their help and support in testing, bug fixing and improvement of the NURBS-Python project.
- Luke Frisken (@kellpossible)
- John-Eric Dufour (@jedufour)
- Jan Heczko (@heczis)
NURBS-Python is licensed under The MIT License.
I would like to thank my PhD adviser, Dr. Adarsh Krishnamurthy , for his guidance and supervision throughout the course of this project.