next up previous contents index
Next: 2. Differential Geometry of Up: 1. Representation of Curves Previous: 1.4.4 B-spline surface   Contents   Index

1.5 Generalization of B-spline to NURBS

Non-Uniform Rational B-Spline (NURBS) curves and surface patches [433,314] are the most popular representation method in CAD/CAM due to their generality, excellent properties and incorporation in international standards such as IGES (Initial Graphics Exchange Specification) [182] and STEP (Standard for the Exchange of Product Model Data) [429]. The NURBS functions have the same properties as integral B-splines, and are capable of representing a wider class of geometries. The NURBS curve is represented in a rational form
$\displaystyle {\bf r}(t) = \frac{\sum_{i=0}^nw_i{\bf p}_iN_{i,k}(t)}
{\sum_{i=0}^nw_iN_{i,k}(t)}\;,$     (1.87)

where $ w_i>0$ is a weighting factor and $ N_{i,k}(u)$ is the B-spline basis function. If all the weights are equal to one, the integral B-spline is recovered. If the number of control points equals the order of the NURBS curve, then the curve reduces to a rational Bézier curve
$\displaystyle {\bf r}(t) = \frac{\sum_{i=0}^nw_i{\bf b}_iB_{i,n}(t)}
{\sum_{i=0}^nw_iB_{i,n}(t)}\;.$     (1.88)

The NURBS formulation permits exact representation of conics, such as circle, ellipse and hyperbola.

Example 1.5.1. Let us express the first quadrant of an ellipse as a rational Bézier curve as shown in Fig. 1.15. A parametric representation of such ellipse segment is given by

$\displaystyle x=a\cos\theta, \;\;\;\;\;\;y=b\sin\theta,\;\;\;\;\;\; 0\leq \theta \leq \frac{\pi}{2}\;,$      

where $ \theta$ is an angle parameter. If we set
$\displaystyle t = \tan\frac{\theta}{2}=\sqrt{\frac{1-\cos\theta}{1+\cos\theta}}\;,$      

then
$\displaystyle \cos\theta=\frac{1-t^2}{t^2+1}, \;\;\;\;\;\;\sin\theta=\frac{2t}{t^2 +1}\;.$      

Therefore the first quadrant of the ellipse can be described by
$\displaystyle x(t)=a\frac{1-t^2}{t^2+1}, \;\;\;\;\;\;y(t)=b\frac{2t}{t^2
+1},\;\;\;\;\;\; 0\leq t \leq 1\;.$     (1.89)

On the other hand a third order rational Bézier curve is given by
$\displaystyle {\bf r}(t) = \frac{w_0(1-t)^2{\bf b}_0 + w_12t(1-t){\bf b}_1+ w_2t^2{\bf b}_2}
{w_0(1-t)^2 + w_12t(1-t)+ w_2t^2},\;\;\;\;\;\; 0\leq t \leq 1\;.$     (1.90)

By equating the denominators of (1.89) and (1.90), we find the weights to be $ w_0=1$ , $ w_1=1$ and $ w_2=2$ . The three control points $ {\bf b}_0$ , $ {\bf b}_1$ , $ {\bf b}_2$ can then be easily obtained by the end points geometric property of the Bézier curve as $ {\bf b}_0=(a,0)^T$ , $ {\bf b}_1=(a,b)^T$ , and $ {\bf b}_2=(0,b)^T$ .

Figure 1.15: The first quadrant of an ellipse described by a rational Bézier curve
\begin{figure}\centerline{\psfig{figure=fig/ellipse1-4.ps,height=2.5in}}\end{figure}

A NURBS surface patch can be represented as

$\displaystyle {\bf r}(u,v) = \frac{\sum_{i=0}^m\sum_{j=0}^nw_{ij}{\bf
p}_{ij}N_{i,k}(u)N_{j,l}(v)}
{\sum_{i=0}^m\sum_{j=0}^nw_{ij}N_{i,k}(u)N_{j,l}(v)}\;,$     (1.91)

where $ w_{ij} > 0$ is a weighting factor. This formulation allows for exact representation of quadrics, tori, surfaces of revolution and very general free-form surfaces. If all $ w_{ij}=1$ , the integral B-spline surface is recovered. If the number of control points are equal to the order of the B-spline basis function in both parameters $ u$ and $ v$ , then the NURBS surface reduces to a rational Bézier surface patch:
$\displaystyle {\bf r}(u,v) = \frac{\sum_{i=0}^m\sum_{j=0}^nw_{ij}{\bf
b}_{ij}B_{i,m}(u)B_{j,n}(v)}
{\sum_{i=0}^m\sum_{j=0}^nw_{ij}B_{i,m}(u)B_{j,n}(v)}\;.$     (1.92)

Figure 1.16: 1/16 of a torus represented by a rational Bézier surface patch
\begin{figure}\centerline{\psfig{figure=fig/torus1-16.ps,height=3in}}\end{figure}

Example 1.5.2. Let us express 1/16th of a torus (in the first octant of a coordinate frame) as a rational Bézier surface as shown in Fig. 1.16. A parametric representation of such a toroidal surface patch is given by

$\displaystyle {\bf r}(\theta, \phi)= (R+a\cos\phi)\cos\theta{\bf i} +
(R+a\cos\...
...theta{\bf j} + a\sin\phi{\bf k},\;\;\; 0\leq
\theta, \phi \leq \frac{\pi}{2}\;,$      

where $ \theta$ and $ \phi$ are angle parameters, $ R>a$ , and $ {\bf i}$ , $ {\bf
j}$ , $ {\bf k}$ are unit vectors having the directions of the positive $ x$ , $ y$ and $ z$ axes, respectively. If we set
$\displaystyle u = \tan\frac{\theta}{2}=\sqrt{\frac{1-\cos\theta}{1+\cos\theta}}...
...{\phi}{2}=\sqrt{\frac{1-\cos\phi}{1+\cos\phi}},\;\;\;\;\;\;
0\leq u,v \leq 1\;,$      

then
$\displaystyle \cos\theta=\frac{1-u^2}{u^2+1}, \;\;\;\;\;\;\sin\theta=\frac{2u}{...
...\;\;\;\;\cos\phi=\frac{1-v^2}{v^2+1},
\;\;\;\;\;\;\sin\phi=\frac{2v}{v^2 +1}\;.$      

Thus the toroidal surface patch under consideration can be described by
    $\displaystyle {\bf r}(u,v)=\left(R +
a\frac{1-v^2}{v^2+1}\right)\frac{1-u^2}{u^...
...a\frac{1-v^2}{v^2+1}\right)\frac{2u}{u^2+1}{\bf j}+
\frac{2va}{v^2+1}{\bf k}\;,$  
    $\displaystyle 0\leq u, v \leq 1\;.$ (1.93)

Now we will convert this rational polynomial surface patch into a rational Bézier surface patch. A biquadratic Bézier surface is given by
$\displaystyle {\bf r}(u,v) = \frac{\sum_{i=0}^2\sum_{j=0}^2w_{ij}{\bf
b}_{ij}B_{i,2}(u)B_{j,2}(v)}
{\sum_{i=0}^2\sum_{j=0}^2w_{ij}B_{i,2}(u)B_{j,2}(v)}\;.$     (1.94)

By equating the denominators of (1.93) and (1.94), we find the weights to be
$\displaystyle w_{00}$ $\displaystyle =$ $\displaystyle 1,\;\;\;\;\;\;w_{01} = 1,\;\;\;\;\;\;w_{02}=2\;,$  
$\displaystyle w_{10}$ $\displaystyle =$ $\displaystyle 1,\;\;\;\;\;\;w_{11} = 1,\;\;\;\;\;\;w_{12}=2\;,$  
$\displaystyle w_{20}$ $\displaystyle =$ $\displaystyle 2,\;\;\;\;\;\;w_{21} = 2,\;\;\;\;\;\;w_{22}=4\;.$  

The nine control points $ {\bf
b}_{ij}$ , $ 0\leq i,j \leq 2$ can then be easily obtained by the end points geometric property of the Bézier surface as:

$ {\bf b}_{00}=(R+a,0,0)^T$ , $ {\bf b}_{01}=(R+a,0,a)^T$ , $ {\bf b}_{02}=(R, 0, a)^T\;,$
$ {\bf b}_{10}=(R+a,R+a,0)^T,$ $ {\bf b}_{11}=(R+a,R+a,a)^T,$ $ {\bf b}_{12}=(R, R, a)^T\;,$
$ {\bf b}_{20}=(0,R+a,0)^T,$ $ {\bf b}_{21}=(0,R+a,a)^T,$ $ {\bf b}_{22}=(0, R, a)^T\;.$



next up previous contents index
Next: 2. Differential Geometry of Up: 1. Representation of Curves Previous: 1.4.4 B-spline surface   Contents   Index
December 2009