Cylindrical Surfaces from NURBS Curves
This Demonstration shows how a cylinder-like surface over a curve can be generated using a nonuniform rational basis spline (NURBS).
Let be a vector of unit length and be a NURBS curve of degree on the knots vector with weights . We want an equation for the general cylinder obtained by sweeping a distance along . Denoting the parameter for the sweep direction by , , clearly must satisfy two conditions:
1. For fixed , is a straight line segment from to , where is some real number.
2. For fixed , .
From the translational invariance property, the desired representation is
using knot vectors and , where and is the knot vector of The control points are given by and , and the weights are . In matrix form, these are:
In addition, denotes the rational basis function of degree , that is,
This Demonstration takes the initial control points to be and the spline weights to be .
 L. Piegl and W. Tiller, The NURBS Book, 2nd ed., Berlin: Springer-Verlag, 1997 pp. 334–336.