= NURBS Curves and Surfaces = == Overview == NURBS is an acronym for Non-Uniform Rational B-Spline. A NURBS curve employs a series of blending functions called "bases" to generate a smooth curve from a sequence of control vertices (CV's) which define a NURBS hull. The primary advantage of using a NURBS curve is that moving a CV only affects a local portion of the spline while also maintaining the continuity of the curve, even at its breakpoints. This allows you to "pull and tug" on the CVs of the NURBS curve or surface to generate a desired shape without causing kinks or discontinuities. The shape of a NURBS curve is greatly influenced by the relative distances between its knots. The knots appear in ascending order, and are possibly repeated. A repeated knot is said to have a _multiplicity_. In a Bezier curve, all knots are unique and, therefore, multiplicities aren't produced. The parallel between Bezier and NURBS knots is that a Bezier knot is similar to a NURBS knot with maximum multiplicity. The Bezier discontinuities mentioned earlier happen at these knots. Similarly, a NURBS curve will have a discontinuity where a knot is at maximum multiplicity. Maximum multiplicity occurs when a knot is repeated _degree_ times in a NURBS basis. Both NURBS and Bezier curves will have a CV on the curve at the point of discontinuity. If the multiplicity happens at the end of the curve, the NURBS curve is considered "clamped." Typically, NURBS curves are clamped at both ends but closed curves are usually un-clamped; Bezier curves are always clamped. [Image:/images/Figure6.jpg] From this, it follows that the shape of a NURBS curve, given a set of CVs, is determined by the relative distance between knots. Typically, there are two types of knot parameterizations: uniform and chord length. In the first, knots are spaced evenly. In the second, the distances between knots are determined by the distances between successive CVs. Uniform parameterization is recommended for regular shapes while chord length is used for free-form shapes. A third type of parameterization, called "centripetal", is similar to chord length and is best suited for sharp curves. A NURBS surface has a topology similar to that of a mesh primitive. In a NURBS surface, each node of the UV coordinate matrix represents a CV connected by rows and columns to form a NURBS hull. This allows modeling of complex smooth surfaces, whose shape is changeable simply by moving the CVs. [Image:/images/Houdini-12-1-20.jpg] TIP: To create an open cubic NURBS surface, you need at least 4 x 4 CVs. In general, for an open surface with U Order <>, and V Order <>, you need <> by <> CVs. For an open NURBS curve of order _m_, you will need at least <> CVs to define it properly. == Creating a sharp point in a NURBS curve == Sometimes you want to create a sharp corner in a NURBS curve. You can do this in three ways: * Change the weight of a selected CV via the Curve > Parameters dialog in the Model Editor to something high like 10,000. This gives the CV so much "pull" that it draws the curve almost right through it. * If you drag the two adjacent CVs of a cubic curve onto a middle CV, it will look like a sharp corner point. This is called raising the _Multiplicity_ of the CV. Maximum CV multiplicity occurs when adjacent "degree" CVs overlap. * Make "degree" knots identical. When this is done, it is called raising the multiplicity of the knot. You can do this in the Refine sop by choosing the Subdivision option, or in the Model Editor by selecting the Refine state and dividing with the middle mouse button (((MMB))).