Sunday, March 23, 2008


What ?

wxNURBS has been designed for two purposes.
  • It can be an application to design NURBS (Non-Uniform Rational B-Splines) curves and surfaces. It is currently in its nascent stage. See this page for more features in the days to come.

  • It can be a NURBS library, providing an API that could be used by other applications.
Features ?

  • Currently 2-D Bezier curves can be rendered ( Plot control points and view them ).

Saturday, March 22, 2008

API Usage

How do I use the API to write code for dealing with Bezier curves ?

// Created On: Aug 15 2004

#include "nbpoint.h"
#include "nbbezier.h"

void printTVal(NBBezier & bez, double tval);
void processBezierCurves();

int main() {

void processBezierCurves() {
NBPoint pt1(-5, 0);
NBPoint pt2( 0, 5);
NBPoint pt3(10, 0);

VPOINT controlpts;
controlpts.push_back( pt1 );
controlpts.push_back( pt2 );
controlpts.push_back( pt3 );

NBBezier bez(controlpts);
printTVal(bez, 0.25);
printTVal(bez, 0.75);
printTVal(bez, 0.99);

void printTVal(NBBezier & bez, double tval) {
NBPoint res = bez.GetPoint(tval);
std::cout << "t = " <<>


  • 0.12 (Aug 15 2004 ):
    • Modules to check overflow errors added.
  • 0.11 (July 31 2004):
    • API to deal with 2-D Bezier curves included.
  • 0.10 (July 31 2004):
    • Initial Version
    • Support to draw Bezier curves


What external libraries do I need ?
  • wxNURBS uses wxWidgets as the windowing toolkit.
    To download wxWidgets, goto
    • Important: Please get version 2.4.2 of wxWidgets for building the application
    • Please install wxWidgets in a path that does not have spaces, say C:\Programs\wxWindows-2.4.2. For some reason, MinGW is not very happy with spaces in the path.
  • Install MinGW from

How do I build ?
  • Set the environment variable WXDIR to point to the installation directory of wxWindows-2.4.2 in your system.

  • Invoke the following command.
    make -f
  • This would build the wxNURBS executable in the directory Debug.


Screenshot of a wxNurbs Instance with a Bezier curve having 6 control points


The current release is 0.12

Previous Versions.