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.
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.
where can i find some good tutorials on programming nurbs meshes. Google keeps sending me to modeling software tutorials.
You can check this book: The NURBS Book
The authors are the expert of NURBS. And there is many C code in this book that you can learn and use it easily. There are also many graphs and examples. If you want to learn something about NURBS, this is the first book you should read! BTW: I am big fun of this book ^_^
I am trying to use B spline curve fitting. The order of B spline curve is 4. When I have many control points, it works well. However if the number of control points is small such as two, my program will crash. I realize that the number of control points is related to number of knots and the order. Can anyone help me clarify the relationship or give some links on it?
As others stated, the number of control points is equal to the number of knots minus the order of the bspline basis. Thus you cannot have an arbitrary combination of order, say k, and knot vector for your bspline function/curve once you fix the control points.
A very useful link for theory on b-splines and nurbs curves is the following: http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/index.html
There you can find the relationship of number of control points with dimensionality of knot vector etc as well as detailed examples and some algorithms.
Depending on your needs, you may also wish to check "The NURBS book" by Piegl and Tiller http://www.amazon.com/NURBS-Book-Monographs-Visual-Communication/dp/3540615458
they have done an amazing job and in their book they include working algorithms.
The curve fitting problem of a b-spline to data is a rather large subject since you have to take care to avoid over/under fitting. There are several approaches, and most involve including a curvature penalty term. The literature is vast, but you can find a lot of information and a great starting point in the book by Hastie et. al. "The elements of statistical learning" which you can legally download from the authors site: http://statweb.stanford.edu/~tibs/ElemStatLearn/
The curve fitting problem is covered to some extent in all references I gave. Good luck.
Can you please list the books on CAD/CAE tool development? I remember browsing through a book on some other topic (OOAD or Design Patterns) with all examples in CAD/CAE tool development. Do you know of any such books?
Apart from books mentioned by Alberto, you should also check Boundary Representation Modelling Techniques
It is one of the very few books available on this topic.
I'm writing a program in C# that will allow me to take in my current heading, my current location, and the next two points I want to come across along my path and I want to output the angle at which I should currently be turning to follow an arc that will allow me to go to the next two points in my path.
Is there a library that will let me do this? Also, I've done a little research, and it looks like something called B-Spline might be useful, but I've no idea how to implement it. Is there a library for that? Also, it appears that Bsplining requires 4 points, and disregards current heading, so that might be an issue.
You can do B-Spline interpolation with derivative constraints for the current heading. You only need at least two points for interpolation. I'm not sure if there is a C# library for that, but you can find whatever is out there on Google.
I do know that algorithms for doing this are made accessible in The NURBS Book, which one could easily implement in C#.