NRBEVAL: Evaluate a NURBS at parametric points.
 
 Calling Sequences:
 
   [p,w] = nrbeval(crv,ut)
   [p,w] = nrbeval(srf,{ut,vt})
   [p,w] = nrbeval(vol,{ut,vt,wt})
   [p,w] = nrbeval(srf,pts)
 
 INPUT:
 
   crv		: NURBS curve, see nrbmak.
 
   srf		: NURBS surface, see nrbmak.

   vol		: NURBS volume, see nrbmak.
 
   ut		: Parametric evaluation points along U direction.

   vt		: Parametric evaluation points along V direction.
 
   wt		: Parametric evaluation points along W direction.

   pts     : Array of scattered points in parametric domain
 
 OUTPUT:

   p		: Evaluated points on the NURBS curve, surface or volume as 
 		Cartesian coordinates (x,y,z). If w is included on the lhs argument
 		list the points are returned as homogeneous coordinates (wx,wy,wz).
 
   w		: Weights of the homogeneous coordinates of the evaluated
 		points. Note inclusion of this argument changes the type 
 		of coordinates returned in p (see above).
 
 Description:
 
   Evaluation of NURBS curves, surfaces or volume at parametric points along  
   the U, V and W directions. Either homogeneous coordinates are returned
   if the weights are requested in the lhs arguments, or as Cartesian coordinates.
   This function utilises the 'C' interface bspeval.
 
 Examples:
 
   Evaluate the NURBS circle at twenty points from 0.0 to 1.0
 
   nrb = nrbcirc;
   ut = linspace(0.0,1.0,20);
   p = nrbeval(nrb,ut);
 
 See also:
  
     bspeval

 Copyright (C) 2000 Mark Spink 
 Copyright (C) 2010 Carlo de Falco
 Copyright (C) 2010, 2011, 2015 Rafael Vazquez

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

Demonstration 1

The following code

 srf = nrbtestsrf;
 p = nrbeval(srf,{linspace(0.0,1.0,20) linspace(0.0,1.0,20)});
 h = surf(squeeze(p(1,:,:)),squeeze(p(2,:,:)),squeeze(p(3,:,:)));
 title('Test surface.');
 hold off

Produces the following figure

Figure 1

Package: nurbs