next up previous contents index
Next: 5.7 Global and Local Up: 5. Examples Previous: 5.5 More examples of   Contents   Index

5.6 Surface Of Revolution with Nurbs

A surface of revolution is created by rotating a contour curve about an axis.

In Example 13 a linear curve (consisting of two straight line segments) is rotated 360 degree about the Y axis. The result is shown in Figure 5.12.

Example 13: (taken from: data/examples/nurbsor1.dat (7.24))

curv1 = NURBCURV(
  (0., 0., 0.5, 1., 1.),
  ((0.,-1.,0.,1), (1.,0.,0.,1), (0.,1.,0.,1))
);
surf1 = NURBSOR( 
  (0.,0.,0.),       /* point on rotation axis */
  (0.,1.,0.),       /* direction of rotation axis */
  360.,             /* rotation angle */
  curv1
);
SCENEROOT = SCENENODE ( 
  (), 
  ( ATTRIBS(front1,back1) ), 
  (surf1)
);

Figure 5.12: Surface Of Revolution
\begin{figure}\centering\includegraphics{revolv1}
\end{figure}


next up previous contents index
Next: 5.7 Global and Local Up: 5. Examples Previous: 5.5 More examples of   Contents   Index
Administrator 2002-01-20