Thank you so much for using the NURBS calculator. I'm glad that my app is helping many CAD engineers and students around the world. It has successfully completed 4 years and it has more than 1000 active users, every month.


I have 16+ years of expertise in CG (computer graphics) software development with strong skills in mathematics and computational geometry. Recently I have acquired new skills like Flutter(Dart), firebase, angular, react, etc for full-stack mobile/web app development. Please contact me on my email id pawangami@gmail.com or refer me.


To know more about me, Visit my linkedin profile.

Buy me a coffeeBuy me a coffee

This WebGL based NURBS application will help you to understand the NURBS curves in a practical and intuitive way. You can also create your own curves and download it, as a text file. You can start with some predefined curves by clicking on one of the images and create new curves, by adding, deleting or modifying the curve parameters. Click here for more information.



Please select a plane, by clicking one of the buttons - ‘XY Plane’, ‘YZ Plane’ or ‘ZX Plane’.





Enter u value between {{uMin}} and {{uMax}} :
u : {{sliderVal}} , Evaluated Point : {{evalPointText}}


Upload NURBS data :

Please login to save the model on the server File name already exists. The previous model will be deleted
Selection from a modal: {{ selected }}

spline circle helix heart
Rendering

Select the type of the curve

For Bezier curves the total number of control points are exactly equal to order of the curve, so to add/remove control points increase/decrease the degree. Bezier curves are always clamped.



Degree :

Control Points : x, y, z, w
{{k}} :


Knots :
Clamped at start Clamped at end


Update Spline Instantly


Number of segments :
Back to top

What is NURBS?

Non Uniform Rational B-Spline is a mathematical model to represent the free form curves and surfaces in computer graphics. It is mostly used in Computer Aided Design (CAD) and creating characters for video games. The mathematics behind NURBS is very vast and complex, but this nurbs-calculator covers only the evaluation part of NURBS curves. And I have tried to make it as simple as possible, so that anyone can understand NURBS without knowing the complex mathematics.

Evaluation means finding the coordinates of a point on the curve, corresponding to some parameter.

Here's is the short summary of each term of NURBS:

Each of these terms is explained in detail here.

Who can use nurbs-calculator?

Why do you need nurbs-calculator?

What are the terminologies?
Curve parameters:

A NURBS curve can be created by just 3 parameters – degree, control point and knot vector. The term knot vector is very confusing. Actually it’s just a sequence of some real numbers, in non-decreasing order.

Degree and order:

It is the measure of curvature of the curve. A curve with degree 1 is called as linear curve, with degree 2 is called as quadratic and degree 3 is called as cubic. In most of NURBS applications you will find curves of degree 2 and 3, only. The degree of the curve is integer and should be > 0. Order of the curve = degree + 1.

Control points:

The control points determine the shape of the curve. Each point is having 4 float values – x position, y position, z position and weight of the control point. The minimum number of control points required to render a NURBS curve is the same as the order of the curve. So you need atleast 4 control points for degree 3 curve.

U parameter:

In mathematics, the equation of a curve can be expressed as a function of an independent variable, called as a parameter. In nurbs-calculator I call this parameter as u parameter. U parameter is used to calculate the coordinates of a point, on the curve, from its parametric equation. Generally it is assumed that u is 0 at the start of the curve and 1 at the end. So at middle of the curve the value of u will be 0.5. Let's assume that there is a line starting at (1,1) and ending at (2,2). Also assume that u=0 at start and u=1 at end. If you are asked to find the coordinates of point, which lies at middle of the line, then in mathematical term you will say that what should be coordinates of point at u=0.5. You can provide this u value to the parametric equation of line and calculate the coordinates at middle point.You can also assume that u=1 at start and u=2 at end or u=10 at start and u=100 at end. It is your assumptions which defines the middle point of the curve, so for 0< u < 1, middle point is at u = 0.5, for 1 < u < 2, middle is at u = 1.5 and for 10 < u < 100 middle is at u=55.

Knot vector:

As mentioned earlier, knot vector is a sequence of some real numbers, in non-decreasing order. This sequence depends on the assumption of u values. If you are assuming that u varies from 0 to 1, then knot vector is sequence of numbers, between 0 and 1. So basically knot values are u values. There is no significance of each knot value separately. It is the sequence, which is important. The total number of knots = number of control points + degree + 1. If degree of the curve is 2 and there are 4 control points, then there will be total 7 knot values. A curve will be called as Non-Uniform, if the sequence of these knot values is non-uniform (e.g 0.0, 0.4, 0.5, 0.6, 0.9, 0.95, 1.0 ) and called as uniform if this sequence is uniform (e.g. 0.0, 0.167, 0.333, 0.5, 0667, 0.833, 1.0).

Knot multiplicity:

Multiplicity means repetition of knot values. Multiplicity is a property of knots that refers to the number of control points associated to a knot. On a cubic curve (degree 3), a knot can have a multiplicity of 1, 2, or 3, but not more than 3. Similarily for degree 2 curve the multiplicity can’t be more than 2. If knot values have multiplicity = degree + 1 at the start, then curve will be clamped at start, that means the curve touches the first control point. If the multiplicity < (degree+ 1) at start, then the curve will not touch the first control point and the curve will start at u = k[p], where p=degree. Same is applicable for the end knots.If the multiplicity at the end is < (degree + 1), then the curve will not touch the last control point and curve will end at u=k[m-p], where m = (total number of knots - 1). That means, if knot vector is = {0, 0.111, 0.222, 0.333, 0.445, 0.556, 0.667, 0.778, 0.889, 1.0} for degree 2 curve, then the curve will start from u = 0.2, which is k[2] and end at u=0.778, which is k[7]. If the multiplicity > (degree + 1), then the curve will split in disjoint parts and the control point will be unused.

These terminolgies have been explained in simple way and may not represent the exact definition. To understand these terms in details, please visit CS3621 Introduction to Computing with Geometry Course Notes or read The NURBS Book. NURBS and its properties are also explained on Rhinoceros - NURBS and NURB curves - a guide for the uninitiated .


How to use nurbs-calculator?


Bézier curves, B-Splines and NURBS

NURBS is a generic term and Bézier curves and B-splines are specific cases of NURBS. As mentioned earlier you need only 3 parameters to render a NURBS curve - degree, control points and knot vector. Putting some restrictions on these 3 parameters can create Bézier curves and B-splines.

What is WebGL?

WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 3D computer graphics and 2D graphics within any compatible web browser (reference - wiki - webGL). In nurbs-calculator I have used three.js to render the nurbs curves, so that a curve can be viewed in 3D. Three.js is a cross-browser JavaScript library/API used to create and display animated 3D computer graphics in a web browser (reference - wiki - three.js). Three.js uses WebGL.

Contact Us

Please feel free to contact me at pawangami@gmail.com if you have any difficulty in using this application.

Feedback

Back to top

Share with Friends and help me spread the word

Tweet