# NurbsEditCurveKnotVector

### From K-3D

<plugin>NurbsEditCurveKnotVector</plugin>

## Description

The knot vector is the "heart" of a NURBS curve/surface. It defines which control points influence each part of the curve.

The order of the curve specifies the number of control points which are active at every point on the curve, the knots tell the Renderer where to change the set of active control vertices and how many of the CVs get replaced.

The number of elements in the knot vector is defined as the number of points plus the order.

Usually the first and the last knot have a multiplicity equal to the order, which means we (de-)activate all needed control points there.
The distance between to knots is arbitrary, the knot vector gets normalized (mapped to the range 0 to 1) before most modifiers are applied.

**A simple example:**

A curve with order 3 (so the basis function has degree 2) has 4 points, lets call them p0, p1, p2 and p3.

The knot vector needs to have 7 elements. Starting with 0 we should enable the first 3 points by repeating the knot value 0 three times.

Then we disable p0 and enable p3 so now p1, p2 and p3 are active (hence the 1), and the last step is to disable all active control points by adding an element with multiplicity 3 at the end.

This results in a knot vector: 0 0 0 1 2 2 2.

For further reference take a look at http://en.wikipedia.org/wiki/NURBS#The_knot_vector.

## Rules for this modifier

- the number of knots cannot be changed (use NurbsCurveInsertKnot for that)
- the knot vector needs to be nondecreasing
- the multiplicity of internal knots is limited by order - 1 (= degree)
- the multiplicity of the ending knots is limited by the order