15

Does anyone know of a library or set of classes for splines - specifically b-splines and NURBS (optional).

A fast, efficient b-spline library would be so useful for me at the moment.

CVertex
  • 17,997
  • 28
  • 94
  • 124

8 Answers8

18

I know I'm answering months after this question was asked, but for others who might be searching for a similar answer, I'll point out openNURBS.

OpenNURBS also happens to be the library used in the modeling package Rhinoceros. It's a very complete library and it's worth consideration.

Naaff
  • 9,213
  • 3
  • 38
  • 43
  • 1
    Thanks man! If I hadn't marked an answer already, OpenNurbs would probably deserve it. – CVertex Jul 10 '09 at 03:02
  • 1
    Understood. Just hoped to make the answers more complete. :) – Naaff Jul 10 '09 at 14:33
  • 9
    I think openNURBS takes care only of saving to/opening from the .3dm format; it does not actually perform geometrical operations. For that, as is mentioned in the link, Rhino SDK is needed, which is proprietary tech. – insys Jan 06 '14 at 09:38
9

1.) For B Splines - You should check Numerical Recipes in C (there is book for that and it is also available online for reference)

2.) Also check: sourceforge.net/projects/einspline/ & this

-AD

goldenmean
  • 18,376
  • 54
  • 154
  • 211
  • The numerical recipes in C code used to fall under a fairly draconian license. Not sure if this is still the case, but but be advised that it may be illegal to use it in open-source projects (I'm not an expert on this though) – Kyle Simek Jan 18 '12 at 19:05
  • 4
    Numerical Recipes doesn't have anything on B-Splines. – Jeff May 31 '14 at 20:00
3

This library may also be promising: http://libnurbs.sourceforge.net

2

Eigen Spline is based on the famous (fast) C++ template library for linear algebra.

Jeff
  • 1,251
  • 1
  • 12
  • 22
1

An excellent library that is also supplemented by an online book is from MIT. Here is the (hyper)book http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/mathe.html

and in the bottom of the link you will find the related software, here: http://web.mit.edu/hyperbook/Patrikalakis-Maekawa-Cho/software.html

GSL has a nice very basic b-spline implementation, but it does not include NURBS curves neither algorithms for inserting/removing knots, or several more advanced things. You can also find many useful algorithms that you can compile in your own language in the book, "The NURBS book", Piegl & Tiller, this one: http://www.amazon.com/NURBS-Book-Monographs-Visual-Communication/dp/3540615458

Numerical Recipes do not include support for b-splines.

Foivos
  • 545
  • 4
  • 13
0

SISL seems to be a good NURBS library (under the AGPL licence). It is part of GoTools which can be cloned here.

arthur.sw
  • 11,052
  • 9
  • 47
  • 104
0

vspline is a free, open source B-spline library. It's comprehensive and fast, with additional code to efficiently process nD raster data like images and volumes. It's header-only C++ template metacode in C++11 standard, with few external dependencies. There is also a debian package of the same name.

Kay F. Jahnke
  • 371
  • 2
  • 7