for the past week I've been facing this problem. For my current project I need to draw NURBS curves, the project already uses OpenNURBS, but I wasn't able to figure out how to use it.
My question is, how can I get the curve points from a few control points ?
I've done quite a bit of searching, and I saw this website: http://www.nar-associates.com/nurbs/c_code.html
I can use the code, but I don't understand how to extend/simplify it to use N amount of control points.
(Also, I'm using C++ so I converted the code from the page to the said language, answers specific to C++ would be better, but I don't have any problems converting between languages.)
try this library:
http://libnurbs.sourceforge.net/
Non-Uniform Rational B-Splines (NURBS) curves and surface are very general mathematical surfaces widely used for representing complex three dimensional shapes in computer graphics.
The goal of libnurbs is to provide a clean, robust and powerful library with the ability to define, manipulate, and analyze NURBS curves and surfaces. We will be building off of the foundation provided by the openNURBS library, implementing functionality missing from that library and making changes as needed. The goal of the openNURBS effort is increased interoperabilty between various CAD systems, so they have no incentive to develop or release a more full-featured library (that's Rhino, their commercial platform) - hence the need for this project.