The mathematics behind NURBS

Polynomial equations

In the simplest mathematic equation, we can represent a two-dimensional line with an equation such as y = 2x. The generalized form of this type of equation is ax + by = c. The expression to the left of the equals sign is called a polynomial because it has more than one term.

In more complex expressions, variables can be multiplied by themselves, producing polynomial terms with exponents, such as the quadratic equation y = ax 2 + bx + c. The exponent 2 on the first occurrence of x means that the graph of this function is curved rather than straight.

Degree

The degree of a polynomial equation is determined by the largest exponent in the equation:

Parametric representations

There are two general ways to write an equation for a curve. The implicit representation combines every variable in one long, nonlinear equation, such as: ax 3 + by 2 + 2cxy + 2dx +2ey + f = 0.

In this representation, to calculate the x and y values to plot them on a graph, we must solve the entire non-linear equation.

The parametric representation rewrites the equation into shorter, easily solved equations that translate one variable into values for the others: x = a + bt + ct 2 + dt 3 + ... y = g + ht + jt 2 + kt 3 + ...

Using this representation, the equations for x and y are simple. We just need a value for t, the point along the curve for which we want to calculate x and y.

You can visualize parametric curves as being drawn by a point moving through space. At any time t, we can calculate the x and y values of the moving point.

This is very important, because the concept of associating a parameter number with every point on the line is used by many tools. This corresponds to the U dimension of the curve.

Complex curve types with NURBS

The lower the degree of a curve equation, the simpler the curve described. What if we want to represent complex curves? The simple answer might be to increase the degree of the curve, but this is not very efficient. The higher the degree of the curve, the more computations are required. Also, curves with degree higher than 7 are subject to wide oscillations in their shape, which makes them impractical for interactive modeling.

The answer is to join relatively low-degree (1 to 7) curve equations together as segments of a larger, more complex composite curve. The points at which the curve segments, or spans, join together are called edit points.

Higher degree curves should not be completely discounted, however. Degree 5 and 7 curves have certain advantages, such as smoother curvature and more “tension”. They are often used in automotive design.

Smooth joins

The degree of the curve determines the smoothness of the joins between spans. Degree 1 (linear) curves give positional continuity at the join. Degree 2 (quadratic) curves give tangent continuity. Degree 3 (cubic) curves give curvature continuity.