POV-Ray : Newsgroups : povray.pov4.discussion.general : NURBS (libraries) Server Time
30 Oct 2025 18:00:38 EDT (-0400)
  NURBS (libraries) (Message 1 to 1 of 1)  
From: Bald Eagle
Subject: NURBS (libraries)
Date: 30 Oct 2025 09:45:00
Message: <web.69036aa7ad61280951af05c025979125@news.povray.org>
Unsure if we'd like to use external libraries, or roll our own, so that there
are no future licensing issues...

For a full C++ implementation of NURBS (Non-Uniform Rational B-Splines), there
are several well-maintained libraries you can explore. Here's a breakdown of the
most notable ones, including the files typically involved and example code
snippets:

✅ Recommended Library: TinyNURBS
GitHub: tinynurbs
License: BSD-3-Clause
Features: [github.com]

Header-only C++14 library
Supports rational and non-rational curves/surfaces
Knot insertion, evaluation, derivatives
OBJ I/O support

Key Files:







Dependencies:

https://github.com/g-truc/glm (OpenGL Mathematics library)

Example Usage:
C++#include <tinynurbs/curve.h>#include <glm/glm.hpp>tinynurbs::Curve<float>
crv;crv.control_points = {glm::vec3(-1, 0, 0), glm::vec3(0, 1, 0), glm::vec3(1,
0, 0)};crv.knots = {0, 0, 0, 1, 1, 1};crv.degree = 2;if
(!tinynurbs::curveIsValid(crv)) {    std::cerr << "Invalid curve configuration!"
<< std::endl;}glm::vec3 pt = tinynurbs::curvePoint(crv, 0.5f);Show more lines

🧠 Advanced Option: libnurbs
Docs: libnurbs on DeepWiki
License: Modified BSD
Features: [deepwiki.com]

Full NURBS curve and surface evaluation
Knot insertion/removal
Degree elevation/reduction
Parameter search via BFGS
Serialization and visualization tools

Key Files:








🧰 Legacy Option: NURBS++
Website: libnurbs.sourceforge.net
License: LGPL
Includes: [libnurbs.s...eforge.net]

Matrix and numerical libraries
NURBS curve/surface manipulation
Older codebase, but still functional


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.