# Created by Octave 3.2.4, Tue Nov 23 12:53:47 2010 EST <mockbuild@jetta.math.Princeton.EDU.private>
# name: cache
# type: cell
# rows: 3
# columns: 68
# name: <cell-element>
# type: string
# elements: 1
# length: 8
basisfun
# name: <cell-element>
# type: string
# elements: 1
# length: 532
 BASISFUN:  Basis function for B-Spline

 -------------------------------------------------------------------------
 ADAPTATION of BASISFUN from C Routine
 -------------------------------------------------------------------------

 Calling Sequence:
 
   N = basisfun(i,u,p,U)
   
    INPUT:
   
      i - knot span  ( from FindSpan() )
      u - parametric point
      p - spline degree
      U - knot sequence
   
    OUTPUT:
   
      N - Basis functions vector(numel(u)x(p+1))
   
    Algorithm A2.2 from 'The NURBS BOOK' pg70.

# name: <cell-element>
# type: string
# elements: 1
# length: 40
 BASISFUN:  Basis function for B-Spline


# name: <cell-element>
# type: string
# elements: 1
# length: 11
basisfunder
# name: <cell-element>
# type: string
# elements: 1
# length: 360
 BASISFUNDER:  B-Spline Basis function derivatives

 Calling Sequence:
 
   ders = basisfunder (i, pl, u, k, nd)

    INPUT:
   
      i   - knot span
      pl  - degree of curve
      u   - parametric points
      k   - knot vector
      nd  - number of derivatives to compute

    OUTPUT:
   
      ders - ders(n, i, :) (i-1)-th derivative at n-th point
   

# name: <cell-element>
# type: string
# elements: 1
# length: 51
 BASISFUNDER:  B-Spline Basis function derivatives


# name: <cell-element>
# type: string
# elements: 1
# length: 10
bspdegelev
# name: <cell-element>
# type: string
# elements: 1
# length: 382
 BSPDEGELEV:  Degree elevate a univariate B-Spline. 
 
 Calling Sequence:
 
   [ic,ik] = bspdegelev(d,c,k,t)
 
 Parameters:
 
   d - Degree of the B-Spline.
   c - Control points, matrix of size (dim,nc).
   k - Knot sequence, row vector of size nk.
   t - Raise the B-Spline degree t times.
 
   ic - Control points of the new B-Spline. 
   ik - Knot vector of the new B-Spline.
 

# name: <cell-element>
# type: string
# elements: 1
# length: 51
 BSPDEGELEV:  Degree elevate a univariate B-Spline.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
bspderiv
# name: <cell-element>
# type: string
# elements: 1
# length: 453
 BSPDERIV:  B-Spline derivative.
 
  MATLAB SYNTAX:
 
         [dc,dk] = bspderiv(d,c,k)
  
  INPUT:
 
    d - degree of the B-Spline
    c - control points          double  matrix(mc,nc)
    k - knot sequence           double  vector(nk)
 
  OUTPUT:
 
    dc - control points of the derivative     double  matrix(mc,nc)
    dk - knot sequence of the derivative      double  vector(nk)
 
  Modified version of Algorithm A3.3 from 'The NURBS BOOK' pg98.

# name: <cell-element>
# type: string
# elements: 1
# length: 32
 BSPDERIV:  B-Spline derivative.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
bspeval
# name: <cell-element>
# type: string
# elements: 1
# length: 383
 BSPEVAL:  Evaluate B-Spline at parametric points.
 
 Calling Sequence:
 
   p = bspeval(d,c,k,u)
 
    INPUT:
 
       d - Degree of the B-Spline.
       c - Control Points, matrix of size (dim,nc).
       k - Knot sequence, row vector of size nk.
       u - Parametric evaluation points, row vector of size nu.
 
    OUTPUT:

       p - Evaluated points, matrix of size (dim,nu)
 

# name: <cell-element>
# type: string
# elements: 1
# length: 50
 BSPEVAL:  Evaluate B-Spline at parametric points.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
bspkntins
# name: <cell-element>
# type: string
# elements: 1
# length: 522
 BSPKNTINS:  Insert knots into a B-Spline

 Calling Sequence:
 
   [ic,ik] = bspkntins(d,c,k,u)

  INPUT:
 
    d - spline degree             integer
    c - control points            double  matrix(mc,nc)      
    k - knot sequence             double  vector(nk) 
    u - new knots                 double  vector(nu)               
 
  OUTPUT:
 
    ic - new control points double  matrix(mc,nc+nu) 
    ik - new knot sequence  double  vector(nk+nu)
 
  Modified version of Algorithm A5.4 from 'The NURBS BOOK' pg164.
 

# name: <cell-element>
# type: string
# elements: 1
# length: 42
 BSPKNTINS:  Insert knots into a B-Spline


# name: <cell-element>
# type: string
# elements: 1
# length: 7
deg2rad
# name: <cell-element>
# type: string
# elements: 1
# length: 399
 DEG2RAD: Convert degrees to radians.
 
 Calling Sequence:
 
   rad = deg2rad(deg);
 
 Parameters:
 
   deg		: Angle in degrees.
 
   rad		: Angle in radians. 
 
 Description:
 
   Convenient utility function for converting degrees to radians, which are
   often the required angular units for functions in the NURBS toolbox.
 
 Examples:
 
   // Convert 35 degrees to radians
   rad = deg2rad(35);

# name: <cell-element>
# type: string
# elements: 1
# length: 37
 DEG2RAD: Convert degrees to radians.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
demo4surf
# name: <cell-element>
# type: string
# elements: 1
# length: 39
 Demonstration of a bilinear surface.


# name: <cell-element>
# type: string
# elements: 1
# length: 37
 Demonstration of a bilinear surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
democirc
# name: <cell-element>
# type: string
# elements: 1
# length: 55
 Demonstration of a circle and arcs in the x-y plane.


# name: <cell-element>
# type: string
# elements: 1
# length: 53
 Demonstration of a circle and arcs in the x-y plane.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
democoons
# name: <cell-element>
# type: string
# elements: 1
# length: 53
 Construction of a bilinearly blended Coons surface


# name: <cell-element>
# type: string
# elements: 1
# length: 52
 Construction of a bilinearly blended Coons surface


# name: <cell-element>
# type: string
# elements: 1
# length: 9
democurve
# name: <cell-element>
# type: string
# elements: 1
# length: 30
 Shows a simple test curve.
 

# name: <cell-element>
# type: string
# elements: 1
# length: 27
 Shows a simple test curve.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
democylind
# name: <cell-element>
# type: string
# elements: 1
# length: 51
 Demonstration of the construction of a cylinder.


# name: <cell-element>
# type: string
# elements: 1
# length: 49
 Demonstration of the construction of a cylinder.

# name: <cell-element>
# type: string
# elements: 1
# length: 11
demodegelev
# name: <cell-element>
# type: string
# elements: 1
# length: 51
 Demonstration of the degree elevation algorithm.


# name: <cell-element>
# type: string
# elements: 1
# length: 49
 Demonstration of the degree elevation algorithm.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
demodercrv
# name: <cell-element>
# type: string
# elements: 1
# length: 85
 Demonstrates the construction of a general
 curve and determine of the derivative.


# name: <cell-element>
# type: string
# elements: 1
# length: 80
 Demonstrates the construction of a general
 curve and determine of the derivati

# name: <cell-element>
# type: string
# elements: 1
# length: 10
demodersrf
# name: <cell-element>
# type: string
# elements: 1
# length: 67
 Demonstrates the construction of a general
 surface derivatives.


# name: <cell-element>
# type: string
# elements: 1
# length: 65
 Demonstrates the construction of a general
 surface derivatives.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
demoellip
# name: <cell-element>
# type: string
# elements: 1
# length: 125
 Demonstration of a unit circle transformed to a inclined ellipse
 by first scaling, then rotating and finally translating.


# name: <cell-element>
# type: string
# elements: 1
# length: 80
 Demonstration of a unit circle transformed to a inclined ellipse
 by first scal

# name: <cell-element>
# type: string
# elements: 1
# length: 11
demoextrude
# name: <cell-element>
# type: string
# elements: 1
# length: 54
 Demonstration of surface construction by extrusion.


# name: <cell-element>
# type: string
# elements: 1
# length: 52
 Demonstration of surface construction by extrusion.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
demogeom
# name: <cell-element>
# type: string
# elements: 1
# length: 92
 Demonstration of how to construct a 2D geometric  
 shape from a piece-wise set of NURBSs


# name: <cell-element>
# type: string
# elements: 1
# length: 80
 Demonstration of how to construct a 2D geometric  
 shape from a piece-wise set

# name: <cell-element>
# type: string
# elements: 1
# length: 9
demohelix
# name: <cell-element>
# type: string
# elements: 1
# length: 38
 Demonstration of a 3D helical curve


# name: <cell-element>
# type: string
# elements: 1
# length: 37
 Demonstration of a 3D helical curve


# name: <cell-element>
# type: string
# elements: 1
# length: 10
demokntins
# name: <cell-element>
# type: string
# elements: 1
# length: 49
 Demonstration of the knot insertion algorithm.


# name: <cell-element>
# type: string
# elements: 1
# length: 47
 Demonstration of the knot insertion algorithm.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
demoline
# name: <cell-element>
# type: string
# elements: 1
# length: 38
 Demonstration of a 3D straight line


# name: <cell-element>
# type: string
# elements: 1
# length: 37
 Demonstration of a 3D straight line


# name: <cell-element>
# type: string
# elements: 1
# length: 8
demorect
# name: <cell-element>
# type: string
# elements: 1
# length: 35
 Demonstrate of rectangluar curve


# name: <cell-element>
# type: string
# elements: 1
# length: 34
 Demonstrate of rectangluar curve


# name: <cell-element>
# type: string
# elements: 1
# length: 11
demorevolve
# name: <cell-element>
# type: string
# elements: 1
# length: 70
 Demonstration of surface construction by revolving a
 profile curve.

# name: <cell-element>
# type: string
# elements: 1
# length: 69
 Demonstration of surface construction by revolving a
 profile curve.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
demoruled
# name: <cell-element>
# type: string
# elements: 1
# length: 47
 Demonstration of ruled surface construction.


# name: <cell-element>
# type: string
# elements: 1
# length: 45
 Demonstration of ruled surface construction.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
demosurf
# name: <cell-element>
# type: string
# elements: 1
# length: 40
 DEMOSURF: Shows a simple test surface


# name: <cell-element>
# type: string
# elements: 1
# length: 39
 DEMOSURF: Shows a simple test surface


# name: <cell-element>
# type: string
# elements: 1
# length: 9
demotorus
# name: <cell-element>
# type: string
# elements: 1
# length: 76
 DEMOTORUS: A second demonstration of surface construction
 by revolution.


# name: <cell-element>
# type: string
# elements: 1
# length: 74
 DEMOTORUS: A second demonstration of surface construction
 by revolution.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
findspan
# name: <cell-element>
# type: string
# elements: 1
# length: 342
 FINDSPAN:  Find the span of a B-Spline knot vector at a parametric point

 Calling Sequence:
 
   s = findspan(n,p,u,U)
 
  INPUT:
 
    n - number of control points - 1
    p - spline degree
    u - parametric point
    U - knot sequence
 
    U(1) <= u <= U(end)
  RETURN:
 
    s - knot span
 
  Algorithm A2.1 from 'The NURBS BOOK' pg68

# name: <cell-element>
# type: string
# elements: 1
# length: 74
 FINDSPAN:  Find the span of a B-Spline knot vector at a parametric point


# name: <cell-element>
# type: string
# elements: 1
# length: 8
nrb4surf
# name: <cell-element>
# type: string
# elements: 1
# length: 791
 
 NRB4SURF: Constructs a NURBS bilinear surface.
 
 Calling Sequence:
 
   srf = nrb4surf(p11,p12,p21,p22)
 
 Parameters:
 
   p11		: Cartesian coordinate of the lhs bottom corner point.
 
   p12		: Cartesian coordinate of the rhs bottom corner point.
 
   p21		: Cartesian coordinate of the lhs top corner point.
  
   p22		: Cartesian coordinate of the rhs top corner point.
 
   srf		: NURBS bilinear surface, see nrbmak. 
 
 Description:
 
   Constructs a bilinear surface defined by four coordinates.
 
   The position of the corner points
 
          ^ V direction
          |
          ----------------
          |p21        p22|
          |              |
          |    SRF       |
          |              |
          |p11        p12|
          -------------------> U direction
 

# name: <cell-element>
# type: string
# elements: 1
# length: 49
 
 NRB4SURF: Constructs a NURBS bilinear surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 18
nrb_srf_basisfun__
# name: <cell-element>
# type: string
# elements: 1
# length: 55
  __NRB_SRF_BASISFUN__: Undocumented internal function

# name: <cell-element>
# type: string
# elements: 1
# length: 55
  __NRB_SRF_BASISFUN__: Undocumented internal function


# name: <cell-element>
# type: string
# elements: 1
# length: 22
nrb_srf_basisfun_der__
# name: <cell-element>
# type: string
# elements: 1
# length: 59
  __NRB_SRF_BASISFUN_DER__: Undocumented internal function

# name: <cell-element>
# type: string
# elements: 1
# length: 59
  __NRB_SRF_BASISFUN_DER__: Undocumented internal function


# name: <cell-element>
# type: string
# elements: 1
# length: 11
nrbbasisfun
# name: <cell-element>
# type: string
# elements: 1
# length: 652
 NRBBASISFUN: Basis functions for NURBS

 Calling Sequence:
 
   B      = nrbbasisfun (u, crv)
   B      = nrbbasisfun ({u, v}, srf)
   [B, N] = nrbbasisfun ({u, v}, srf)
   [B, N] = nrbbasisfun (p, srf)

    INPUT:
   
      u or p(1,:,:)  - parametric points along u direction
      v or p(2,:,:)  - parametric points along v direction
      crv - NURBS curve
      srf - NURBS surface
   
    OUTPUT:
   
      B - Basis functions 
          size(B)=[numel(u),(p+1)] for curves
          or [numel(u)*numel(v), (p+1)*(q+1)] for surfaces

      N - Indices of the basis functions that are nonvanishing at each
          point. size(N) == size(B)
   

# name: <cell-element>
# type: string
# elements: 1
# length: 40
 NRBBASISFUN: Basis functions for NURBS


# name: <cell-element>
# type: string
# elements: 1
# length: 14
nrbbasisfunder
# name: <cell-element>
# type: string
# elements: 1
# length: 932
 NRBBASISFUNDER:  NURBS basis functions derivatives

 Calling Sequence:
 
   Bu          = nrbbasisfunder (u, crv)
   [Bu, N]     = nrbbasisfunder (u, crv)
   [Bu, Bv]    = nrbbasisfunder ({u, v}, srf)
   [Bu, Bv, N] = nrbbasisfunder ({u, v}, srf)
   [Bu, Bv, N] = nrbbasisfunder (p, srf)

    INPUT:
   
      u or p(1,:,:)  - parametric points along u direction
      v or p(2,:,:)  - parametric points along v direction
      crv - NURBS curve
      srf - NURBS surface
   
    OUTPUT:
   
      Bu - Basis functions derivatives WRT direction u
           size(Bu)=[numel(u),(p+1)] for curves
           or [numel(u)*numel(v), (p+1)*(q+1)] for surfaces

      Bv - Basis functions derivatives WRT direction v
           size(Bv)=[numel(v),(p+1)] for curves
           or [numel(u)*numel(v), (p+1)*(q+1)] for surfaces

      N - Indices of the basis functions that are nonvanishing at each
          point. size(N) == size(B)
   

# name: <cell-element>
# type: string
# elements: 1
# length: 52
 NRBBASISFUNDER:  NURBS basis functions derivatives


# name: <cell-element>
# type: string
# elements: 1
# length: 19
nrbbasisfungradient
# name: <cell-element>
# type: string
# elements: 1
# length: 727
 -- Function File: [DRDX, DRDY]= nrbbasisfungradient ({DZDU, DZDV},
          {DXDU, DYDU, DXDV, DYDV})
 -- Function File: [DRDX]= nrbbasisfungradient (DZDU, DXDU)
     NRBBASISFUNGRADIENT Compute the gradient of the basis functions of
     a NURBS surface at the specified parametric points.

     INPUT:
        - DZDU, DZDV: basis function derivatives with respect to
          parameters `u' and `v'

        - DXDU, DYDU, DXDV, DYDV: NURBS geometry map derivatives

     OUTPUT:
        - DRDX derivative of the basis functions with respect to the
          `x' direction

        - DRDY derivative of the basis functions with respect to the
          `y' direction

     See also: nrbbasisfunder, nrbbasisfun, nrbderiv



# name: <cell-element>
# type: string
# elements: 1
# length: 80
NRBBASISFUNGRADIENT Compute the gradient of the basis functions of a
NURBS surfa

# name: <cell-element>
# type: string
# elements: 1
# length: 7
nrbcirc
# name: <cell-element>
# type: string
# elements: 1
# length: 662
 
 NRBCIRC: Construct a circular arc.
 
 Calling Sequence:
 
   crv = nrbarc()
   crv = nrbarc(radius)
   crv = nrbarc(radius,center)
   crv = nrbarc(radius,center,sang,eang)
 
 Parameters:
 
   radius	: Radius of the circle, default 1.0
 
   center	: Center of the circle, default (0,0,0)
 
   sang	: Start angle, default 0 degrees
 
   eang	: End angle 360 degrees
 
   crv		: NURBS curve for a circular arc.
 
 Description:
 
   Constructs NURBS data structure for a circular arc in the x-y plane. If
   no rhs arguments are supplied a unit circle with center (0.0,0.0) is
   constructed. 
 
   Angles are defined as positive in the anti-clockwise direction.

# name: <cell-element>
# type: string
# elements: 1
# length: 37
 
 NRBCIRC: Construct a circular arc.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
nrbcoons
# name: <cell-element>
# type: string
# elements: 1
# length: 1845
 
 NRBCOONS: Construction of a Coons patch.
 
 Calling Sequence:
 
   srf = nrbcoons(ucrv1, ucrv2, vcrv1, vcrv2)
 
 Parameters:
 
  ucrv1	: NURBS curve defining the bottom U direction boundary of
 		the constructed NURBS surface.
 
   ucrv2	: NURBS curve defining the top U direction boundary of
 		the constructed NURBS surface.
 
   vcrv1	: NURBS curve defining the bottom V direction boundary of
 		the constructed NURBS surface.
 
   vcrv2	: NURBS curve defining the top V direction boundary of
 		the constructed NURBS surface.
 
   srf		: Coons NURBS surface patch.
 
 Description:
 
   Construction of a bilinearly blended Coons surface patch from four NURBS
   curves that define the boundary.
 
   The orientation of the four NURBS boundary curves.
 
          ^ V direction
          |
          |     ucrv2
          ------->--------
          |              |
          |              |
    vcrv1 ^   Surface    ^ vcrv2
          |              |
          |              |
          ------->-----------> U direction
                ucrv1
 
 
 Examples:
 
   // Define four NURBS curves and construct a Coons surface patch.
   pnts = [ 0.0  3.0  4.5  6.5 8.0 10.0;
            0.0  0.0  0.0  0.0 0.0  0.0; 
            2.0  2.0  7.0  4.0 7.0  9.0];   
   crv1 = nrbmak(pnts, [0 0 0 1/3 0.5 2/3 1 1 1]);
 
   pnts= [ 0.0  3.0  5.0  8.0 10.0;
           10.0 10.0 10.0 10.0 10.0;
           3.0  5.0  8.0  6.0 10.0];
   crv2 = nrbmak(pnts, [0 0 0 1/3 2/3 1 1 1]);
 
   pnts= [ 0.0 0.0 0.0 0.0;
           0.0 3.0 8.0 10.0;
           2.0 0.0 5.0 3.0];
   crv3 = nrbmak(pnts, [0 0 0 0.5 1 1 1]);
 
   pnts= [ 10.0 10.0 10.0 10.0 10.0;
           0.0   3.0  5.0  8.0 10.0;
           9.0   7.0  7.0 10.0 10.0];
   crv4 = nrbmak(pnts, [0 0 0 0.25 0.75 1 1 1]);
 
   srf = nrbcoons(crv1, crv2, crv3, crv4);
   nrbplot(srf,[20 20],220,45);

# name: <cell-element>
# type: string
# elements: 1
# length: 43
 
 NRBCOONS: Construction of a Coons patch.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
nrbcylind
# name: <cell-element>
# type: string
# elements: 1
# length: 658
 
 NRBCYLIND: Construct a cylinder or cylindrical patch.
 
 Calling Sequence:
 
   srf = nrbcylind()
   srf = nrbcylind(height)
   srf = nrbcylind(height,radius)
   srf = nrbcylind(height,radius,center)
   srf = nrbcylind(height,radius,center,sang,eang)
 
 Parameters:
 
   height	: Height of the cylinder along the axis, default 1.0
 
   radius	: Radius of the cylinder, default 1.0
 
   center	: Center of the cylinder, default (0,0,0)
 
   sang        : Start angle relative to the origin, default 0.
 
   eang	: End angle relative to the origin, default 2*pi.
 
 
 Description:
 
   Construct a cylinder or cylindrical patch by extruding a circular arc.

# name: <cell-element>
# type: string
# elements: 1
# length: 56
 
 NRBCYLIND: Construct a cylinder or cylindrical patch.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
nrbdegelev
# name: <cell-element>
# type: string
# elements: 1
# length: 819
 
 NRBDEGELEV: Elevate the degree of the NURBS curve or surface.
 
 Calling Sequence:
 
   ecrv = nrbdegelev(crv,utimes);
   esrf = nrbdegelev(srf,{utimes,vtimes});
 
 Parameters:
 
   crv		: NURBS curve, see nrbmak.
 
   srf		: NURBS surface, see nrbmak.
 
   utimes	: Increase the degree along U direction utimes.
 
   vtimes	: Increase the degree along V direction vtimes.
 
   ecrv	: new NURBS structure for a curve with degree elevated.
 
   esrf        : new NURBS structure for a surface with degree elevated.
 
 
 Description:
 
   Degree elevates the NURBS curve or surface. This function uses the
   B-Spline function bspdegelev, which interface to an internal 'C'
   routine.
 
 Examples:
 
   Increase the NURBS surface twice along the V direction.
   esrf = nrbdegelev(srf, 0, 1); 
 
 See:
 
   bspdegelev

# name: <cell-element>
# type: string
# elements: 1
# length: 64
 
 NRBDEGELEV: Elevate the degree of the NURBS curve or surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
nrbderiv
# name: <cell-element>
# type: string
# elements: 1
# length: 1145
 
 NRBDERIV: Construct the first derivative representation of a
           NURBS curve or surface.
 
 Calling Sequence:
 
   ders = nrbderiv(nrb);
 
 Parameters:
 
   nrb		: NURBS data structure, see nrbmak.
 
   ders	: A data structure that represents the first
 		  derivatives of a NURBS curve or surface.
 
 Description:
 
   The derivatives of a B-Spline are themselves a B-Spline of lower degree,
   giving an efficient means of evaluating multiple derivatives. However,
   although the same approach can be applied to NURBS, the situation for
   NURBS is a more complex. I have at present restricted the derivatives
   to just the first. I don't claim that this implentation is
   the best approach, but it will have to do for now. The function returns
   a data struture that for a NURBS curve contains the first derivatives of
   the B-Spline representation. Remember that a NURBS curve is represent by
   a univariate B-Spline using the homogeneous coordinates.
   The derivative data structure can be evaluated later with the function
   nrbdeval.
 
 Examples:
 
   See the function nrbdeval for an example.
 
 See:
 
       nrbdeval

# name: <cell-element>
# type: string
# elements: 1
# length: 80
 
 NRBDERIV: Construct the first derivative representation of a
           NURBS

# name: <cell-element>
# type: string
# elements: 1
# length: 8
nrbdeval
# name: <cell-element>
# type: string
# elements: 1
# length: 764
 NRBDEVAL: Evaluation of the derivative NURBS curve or surface.

     [pnt, jac] = nrbdeval(crv, dcrv, tt)
     [pnt, jac] = nrbdeval(srf, dsrf, {tu tv})

 INPUTS:

   crv    - original NURBS curve.

   srf    - original NUBRS surface

   dcrv   - NURBS derivative represention of crv

   dsrf   - NURBS derivative represention of surface

   tt     - parametric evaluation points
            If the nurbs is a surface then tt is a cell
            {tu, tv} are the parametric coordinates

   pnt  - evaluated points.
   jac  - evaluated first derivatives (Jacobian).

 Examples:
 
   // Determine the first derivatives a NURBS curve at 9 points for 0.0 to
   // 1.0
   tt = linspace(0.0, 1.0, 9);
   dcrv = nrbderiv(crv);
   [pnts,jac] = nrbdeval(crv, dcrv, tt);

# name: <cell-element>
# type: string
# elements: 1
# length: 63
 NRBDEVAL: Evaluation of the derivative NURBS curve or surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
nrbeval
# name: <cell-element>
# type: string
# elements: 1
# length: 1188
 
 NRBEVAL: Evaluate a NURBS at parameteric points.
 
 Calling Sequence:
 
   [p,w] = nrbeval(crv,ut)
   [p,w] = nrbeval(srf,{ut,vt})
 
 Parameters:
 
   crv		: NURBS curve, see nrbmak.
 
   srf		: NURBS surface, see nrbmak.
 
   ut		: Parametric evaluation points along U direction.

   vt		: Parametric evaluation points along V direction.
 
   p		: Evaluated points on the NURBS curve or surface 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 or surfaces at parametric points along the 
   U and V 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:
  
     bspeval


# name: <cell-element>
# type: string
# elements: 1
# length: 51
 
 NRBEVAL: Evaluate a NURBS at parameteric points.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
nrbextrude
# name: <cell-element>
# type: string
# elements: 1
# length: 656

 NRBEXTRUDE: Construct a NURBS surface by extruding a NURBS curve.
 
 Calling Sequence:
 
   srf = nrbextrude(crv,vec);
 
 Parameters:
 
   crv		: NURBS curve to extrude, see nrbmak.
 
   vec		: Vector along which the curve is extruded.
 
   srf		: NURBS surface constructed.
 
 Description:
 
   Constructs a NURBS surface by extruding a NURBS curve along a defined 
   vector. The NURBS curve forms the U direction of the surface edge, and
   extruded along the vector in the V direction. Note NURBS surfaces cannot
   be extruded.
 
 Examples:
 
   Form a hollow cylinder by extruding a circle along the z-axis.

   srf = nrbextrude(nrbcirc, [0,0,1]);

# name: <cell-element>
# type: string
# elements: 1
# length: 67

 NRBEXTRUDE: Construct a NURBS surface by extruding a NURBS curve.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
nrbkntins
# name: <cell-element>
# type: string
# elements: 1
# length: 1423
 
 NRBKNTINS: Insert a single or multiple knots into a NURBS curve or
            surface.
 
 Calling Sequence:
 
   icrv = nrbkntins(crv,iuknots);
   isrf = nrbkntins(srf,{iuknots ivknots});
 
 Parameters:
 
   crv		: NURBS curve, see nrbmak.
 
   srf		: NURBS surface, see nrbmak.
 
   iuknots	: Knots to be inserted along U direction.
 
   ivknots	: Knots to be inserted along V direction.
 
   icrv	: new NURBS structure for a curve with knots inserted.
 
   isrf	: new NURBS structure for a surface with knots inserted.
 
 Description:
 
   Inserts knots into the NURBS data structure, these can be knots at
   new positions or at the location of existing knots to increase the
   multiplicity. Note that the knot multiplicity cannot be increased
   beyond the order of the spline. Knots along the V direction can only
   inserted into NURBS surfaces, not curve that are always defined along
   the U direction. This function use the B-Spline function bspkntins,
   which interfaces to an internal 'C' routine.
 
 Examples:
 
   Insert two knots into a curve, one at 0.3 and another
   twice at 0.4

   icrv = nrbkntins(crv, [0.3 0.4 0.4])
 
   Insert into a surface two knots as (1) into the U knot
   sequence and one knot into the V knot sequence at 0.5.

   isrf = nrbkntins(srf, {[0.3 0.4 0.4] [0.5]})
 
 Also see:
 
   bspkntins

 Note:

   No knot multiplicity will be increased beyond the order of the spline.

# name: <cell-element>
# type: string
# elements: 1
# length: 80
 
 NRBKNTINS: Insert a single or multiple knots into a NURBS curve or
          

# name: <cell-element>
# type: string
# elements: 1
# length: 7
nrbline
# name: <cell-element>
# type: string
# elements: 1
# length: 465
 
 NRBLINE: Construct a straight line.
 
 Calling Sequence:
 
   crv = nrbline()
   crv = nrbline(p1,p2)
 
 Parameters:
 
 p1		: 2D or 3D cartesian coordinate of the start point.
 
 p2            : 2D or 3D cartesian coordinate of the end point.
 
 crv		: NURBS curve for a straight line.
 
 Description:
 
   Constructs NURBS data structure for a straight line. If no rhs 
   coordinates are included the function returns a unit straight
   line along the x-axis.

# name: <cell-element>
# type: string
# elements: 1
# length: 38
 
 NRBLINE: Construct a straight line.

# name: <cell-element>
# type: string
# elements: 1
# length: 6
nrbmak
# name: <cell-element>
# type: string
# elements: 1
# length: 3298

 NRBMAK: Construct the NURBS structure given the control points
            and the knots.
 
 Calling Sequence:
 
   nurbs   = nrbmak(cntrl,knots);
 
 Parameters:
 
   cntrl       : Control points, these can be either Cartesian or
 		homogeneous coordinates.
 
 		For a curve the control points are represented by a
 		matrix of size (dim,nu) and for a surface a multidimensional
 		array of size (dim,nu,nv). Where nu is number of points along
 		the parametric U direction, and nv the number of points
               along the V direction. Dim is the dimension valid options
 		are
 		2 .... (x,y)        2D Cartesian coordinates
 		3 .... (x,y,z)      3D Cartesian coordinates
 		4 .... (wx,wy,wz,w) 4D homogeneous coordinates
 
   knots	: Non-decreasing knot sequence spanning the interval
               [0.0,1.0]. It's assumed that the curves and surfaces
               are clamped to the start and end control points by knot
               multiplicities equal to the spline order.
               For curve knots form a vector and for a surface the knot
               are stored by two vectors for U and V in a cell structure.
               {uknots vknots}
               
   nurbs 	: Data structure for representing a NURBS curve.
 
 NURBS Structure:
 
   Both curves and surfaces are represented by a structure that is
   compatible with the Spline Toolbox from Mathworks
 
 	nurbs.form   .... Type name 'B-NURBS'
 	nurbs.dim    .... Dimension of the control points
 	nurbs.number .... Number of Control points
       nurbs.coefs  .... Control Points
       nurbs.order  .... Order of the spline
       nurbs.knots  .... Knot sequence
 
   Note: the control points are always converted and stored within the
   NURBS structure as 4D homogeneous coordinates. A curve is always stored 
   along the U direction, and the vknots element is an empty matrix. For
   a surface the spline degree is a vector [du,dv] containing the degree
   along the U and V directions respectively.
 
 Description:
 
   This function is used as a convenient means of constructing the NURBS
   data structure. Many of the other functions in the toolbox rely on the 
   NURBS structure been correctly defined as shown above. The nrbmak not
   only constructs the proper structure, but also checks for consistency.
   The user is still free to build his own structure, in fact a few
   functions in the toolbox do this for convenience.
 
 Examples:
 
   Construct a 2D line from (0.0,0.0) to (1.5,3.0).
   For a straight line a spline of order 2 is required.
   Note that the knot sequence has a multiplicity of 2 at the
   start (0.0,0.0) and end (1.0 1.0) in order to clamp the ends.
 
   line = nrbmak([0.0 1.5; 0.0 3.0],[0.0 0.0 1.0 1.0]);
   nrbplot(line, 2);
 
   Construct a surface in the x-y plane i.e
     
     ^  (0.0,1.0) ------------ (1.0,1.0)
     |      |                      |
     | V    |                      |
     |      |      Surface         |
     |      |                      |
     |      |                      |
     |  (0.0,0.0) ------------ (1.0,0.0)
     |
     |------------------------------------>
                                       U 

   coefs = cat(3,[0 0; 0 1],[1 1; 0 1]);
   knots = {[0 0 1 1]  [0 0 1 1]}
   plane = nrbmak(coefs,knots);
   nrbplot(plane, [2 2]);

# name: <cell-element>
# type: string
# elements: 1
# length: 80

 NRBMAK: Construct the NURBS structure given the control points
            and

# name: <cell-element>
# type: string
# elements: 1
# length: 14
nrbnumbasisfun
# name: <cell-element>
# type: string
# elements: 1
# length: 495
 NRBNUMBASISFUN:  Numbering of basis functions for NURBS

 Calling Sequence:
 
   N      = nrbbasisfun (u, crv)
   N      = nrbbasisfun ({u, v}, srf)
   N      = nrbbasisfun (p, srf)

    INPUT:
   
      u or p(1,:,:)  - parametric points along u direction
      v or p(2,:,:)  - parametric points along v direction
      crv - NURBS curve
      srf - NURBS surface
   
    OUTPUT:

      N - Indices of the basis functions that are nonvanishing at each
          point. size(N) == size(B)
   

# name: <cell-element>
# type: string
# elements: 1
# length: 57
 NRBNUMBASISFUN:  Numbering of basis functions for NURBS


# name: <cell-element>
# type: string
# elements: 1
# length: 7
nrbplot
# name: <cell-element>
# type: string
# elements: 1
# length: 755
 
 NRBPLOT: Plot a NURBS curve or surface.
 
 Calling Sequence:
 
   nrbplot(nrb,subd)
   nrbplot(nrb,subd,p,v)
 
 Parameters:
 
 
   nrb		: NURBS curve or surface, see nrbmak.
 
   npnts	: Number of evaluation points, for a surface a row vector
 		with two elements for the number of points along the U and
 		V directions respectively.
 
   [p,v]       : property/value options

               Valid property/value pairs include:

               Property        Value/{Default}
               -----------------------------------
               light           {off} | true  
               colormap        {'copper'}

 Example:

   Plot the test surface with 20 points along the U direction
   and 30 along the V direction

   plot(nrbtestsrf, [20 30])

# name: <cell-element>
# type: string
# elements: 1
# length: 42
 
 NRBPLOT: Plot a NURBS curve or surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
nrbrect
# name: <cell-element>
# type: string
# elements: 1
# length: 552
 
 NRBRECT: Construct NURBS representation of a rectangle.
 
 Calling Sequence:
 
   crv = nrbrect()
   crv = nrbrect(size)
   crv = nrbrect(width, height)
 
 Parameters:
 
   size		: Size of the square (width = height).
 
   width		: Width of the rectangle (along x-axis).
 
   height	: Height of the rectangle (along y-axis).
 
   crv		: NURBS curve, see nrbmak. 
  
 
 Description:
 
   Construct a rectangle or square in the x-y plane with the bottom
   lhs corner at (0,0,0). If no rhs arguments provided the function
   constructs a unit square.

# name: <cell-element>
# type: string
# elements: 1
# length: 58
 
 NRBRECT: Construct NURBS representation of a rectangle.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
nrbreverse
# name: <cell-element>
# type: string
# elements: 1
# length: 322

 NRBREVERSE: Reverse the evaluation direction of a NURBS curve or surface.
 
 Calling Sequence:
 
   rnrb = nrbreverse(nrb);
 
 Parameters:
 
   nrb		: NURBS data structure, see nrbmak.
 
   rnrb		: Reversed NURBS.
 
 Description:
 
   Utility function to reverse the evaluation direction of a NURBS
   curve or surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 75

 NRBREVERSE: Reverse the evaluation direction of a NURBS curve or surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
nrbrevolve
# name: <cell-element>
# type: string
# elements: 1
# length: 1262
 
 NRBREVOLVE: Construct a NURBS surface by revolving a NURBS curve.
 
 Calling Sequence:
 
   srf = nrbrevolve(crv,pnt,vec[,ang])
 
 Parameters:
 
   crv		: NURBS curve to revolve, see nrbmak.
 
   pnt		: Coordinate of the point used to define the axis
               of rotation.
 
   vec		: Vector defining the direction of the rotation axis.
 
   ang		: Angle to revolve the curve, default 2*pi
 
 Description:
 
   Construct a NURBS surface by revolving the profile NURBS curve around
   an axis defined by a point and vector.
 
 Examples:
 
   Construct a sphere by rotating a semicircle around a x-axis.

   crv = nrbcirc(1.0,[0 0 0],0,pi);
   srf = nrbrevolve(crv,[0 0 0],[1 0 0]);
   nrbplot(srf,[20 20]);

 NOTE:

   The algorithm:

     1) vectrans the point to the origin (0,0,0)
     2) rotate the vector into alignment with the z-axis

     for each control point along the curve

     3) determine the radius and angle of control
        point to the z-axis
     4) construct a circular arc in the x-y plane with 
        this radius and start angle and sweep angle theta 
     5) combine the arc and profile, coefs and weights.
  
     next control point

     6) rotate and vectrans the surface back into position
        by reversing 1 and 2.


# name: <cell-element>
# type: string
# elements: 1
# length: 68
 
 NRBREVOLVE: Construct a NURBS surface by revolving a NURBS curve.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
nrbruled
# name: <cell-element>
# type: string
# elements: 1
# length: 597
 NRBRULED: Construct a ruled surface between two NURBS curves.
 
 Calling Sequence:
 
   srf = nrbruled(crv1, crv2)
 
 Parameters:
 
   crv1		: First NURBS curve, see nrbmak.
 
   crv2		: Second NURBS curve, see nrbmak.
 
   srf		: Ruled NURBS surface.
 
 Description:
 
   Constructs a ruled surface between two NURBS curves. The ruled surface is
   ruled along the V direction.
 
 Examples:
 
   Construct a ruled surface between a semicircle and a straight line.
 
   cir = nrbcirc(1,[0 0 0],0,pi);
   line = nrbline([-1 0.5 1],[1 0.5 1]);
   srf = nrbruled(cir,line);
   nrbplot(srf,[20 20]);

# name: <cell-element>
# type: string
# elements: 1
# length: 62
 NRBRULED: Construct a ruled surface between two NURBS curves.

# name: <cell-element>
# type: string
# elements: 1
# length: 14
nrbsrfgradient
# name: <cell-element>
# type: string
# elements: 1
# length: 157
 -- Function File: [DZDX, DZDY]= nrbsrfgradient (NRB, NRBDER, U, V)
     NRBSRFGRADIENT: Compute the gradient of a NURBS surface.

     See also: nrbderiv



# name: <cell-element>
# type: string
# elements: 1
# length: 56
NRBSRFGRADIENT: Compute the gradient of a NURBS surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
nrbtestcrv
# name: <cell-element>
# type: string
# elements: 1
# length: 46
 NRBTESTCRV: Constructs a simple test curve. 

# name: <cell-element>
# type: string
# elements: 1
# length: 44
 NRBTESTCRV: Constructs a simple test curve.

# name: <cell-element>
# type: string
# elements: 1
# length: 10
nrbtestsrf
# name: <cell-element>
# type: string
# elements: 1
# length: 47
 NRBTESTSRF: Constructs a simple test surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 46
 NRBTESTSRF: Constructs a simple test surface.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
nrbtform
# name: <cell-element>
# type: string
# elements: 1
# length: 945
 
 NRBTFOR: Apply transformation matrix to the NURBS.
 
 Calling Sequence:
 
   tnurbs = nrbtform(nurbs,tmatrix);
 
 Parameters:
 
   nurbs	: NURBS data structure (see nrbmak for details).
 
   tmatrix     : Transformation matrix, a matrix of size (4,4) defining
                 a single or multiple transformations.
 
   tnurbs	: The return transformed NURBS data structure.
 
 Description:
 
   The NURBS is transform as defined a transformation matrix of size (4,4),
   such as a rotation, translation or change in scale. The transformation
   matrix can define a single transformation or multiple series of
   transformations. The matrix can be simple constructed by the functions
   vecscale, vectrans, vecrotx, vecroty, and vecrotz.
     
 Examples:
 
   Rotate a square by 45 degrees about the z axis.

   rsqr = nrbtform(nrbrect(), vecrotz(deg2rad(45)));
   nrbplot(rsqr, 10);
 
 See:
 
   vecscale, vectrans, vecrotx, vecroty, vecrotz

# name: <cell-element>
# type: string
# elements: 1
# length: 53
 
 NRBTFOR: Apply transformation matrix to the NURBS.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
nrbtransp
# name: <cell-element>
# type: string
# elements: 1
# length: 376
 
 NRBTRANSP: Transpose a NURBS surface, by swapping U and V directions.
 
 Calling Sequence:
 
   tsrf = nrbtransp(srf)

 Parameters:
 
   srf		: NURBS surface, see nrbmak.
 
   tsrf	: NURBS surface with U and V diretions transposed.
 
 Description:
 
   Utility function that transposes a NURBS surface, by swapping U and
   V directions. NURBS curves cannot be transposed.

# name: <cell-element>
# type: string
# elements: 1
# length: 72
 
 NRBTRANSP: Transpose a NURBS surface, by swapping U and V directions.

# name: <cell-element>
# type: string
# elements: 1
# length: 11
numbasisfun
# name: <cell-element>
# type: string
# elements: 1
# length: 331
 NUMBASISFUN:  List non-zero Basis functions for B-Spline in a given knot-span

 Calling Sequence:
 
   N = numbasisfun(i,u,p,U)
   
    INPUT:
   
      i - knot span  ( from FindSpan() )
      u - parametric point
      p - spline degree
      U - knot sequence
   
    OUTPUT:
   
      N - Basis functions (numel(u)x(p+1))
   

# name: <cell-element>
# type: string
# elements: 1
# length: 79
 NUMBASISFUN:  List non-zero Basis functions for B-Spline in a given knot-span


# name: <cell-element>
# type: string
# elements: 1
# length: 7
rad2deg
# name: <cell-element>
# type: string
# elements: 1
# length: 400
 
 RAD2DEG: Convert radians to degrees.
 
 Calling Sequence:
 
   rad = rad2deg(deg);
 
 Parameters:
 
   rad		: Angle in radians.

   deg		: Angle in degrees.
 
 Description:
 
   Convenient utility function for converting radians to degrees, which are
   often the required angular units for functions in the NURBS toolbox.
 
 Examples:
 
   Convert 0.3 radians to degrees
 
   rad = deg2rad(0.3);

# name: <cell-element>
# type: string
# elements: 1
# length: 39
 
 RAD2DEG: Convert radians to degrees.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
vecangle
# name: <cell-element>
# type: string
# elements: 1
# length: 623
 
 VECANGLE: An alternative to atan, returning an arctangent in the 
             range 0 to 2*pi.
 
 Calling Sequence:
 
   ang = vecmag2(num,dum)
 
 Parameters:
 
   num		: Numerator, vector of size (1,nv).
   dem		: Denominator, vector of size (1,nv).
   ang		: Arctangents, row vector of angles.
 
 Description:
 
   The components of the vector ang are the arctangent of the corresponding
   enties of num./dem. This function is an alternative for 
   atan, returning an angle in the range 0 to 2*pi.
 
 Examples:
 
   Find the atan(1.2,2.0) and atan(1.5,3.4) using vecangle
 
   ang = vecangle([1.2 1.5], [2.0 3.4]);

# name: <cell-element>
# type: string
# elements: 1
# length: 80
 
 VECANGLE: An alternative to atan, returning an arctangent in the 
           

# name: <cell-element>
# type: string
# elements: 1
# length: 8
veccross
# name: <cell-element>
# type: string
# elements: 1
# length: 670
 
 VECCROSS: The cross product of two vectors.
 
 Calling Sequence:
 
   cross = veccross(vec1,vec2);
 
 Parameters:
 
   vec1	: An array of column vectors represented by a matrix of
   vec2	size (dim,nv), where is the dimension of the vector and
 		nv the number of vectors.
 
   cross	: Array of column vectors, each element is corresponding
 		to the cross product of the respective components in vec1
 		and vec2.
 
 Description:
 
   Cross product of two vectors.
 
 Examples:
 
   Determine the cross products of:
   (2.3,3.4,5.6) and (1.2,4.5,1.2)
   (5.1,0.0,2.3) and (2.5,3.2,4.0)
 
   cross = veccross([2.3 5.1; 3.4 0.0; 5.6 2.3],[1.2 2.5; 4.5 3.2; 1.2 4.0]);

# name: <cell-element>
# type: string
# elements: 1
# length: 46
 
 VECCROSS: The cross product of two vectors.

# name: <cell-element>
# type: string
# elements: 1
# length: 6
vecdot
# name: <cell-element>
# type: string
# elements: 1
# length: 650
 
 VECDOT: The dot product of two vectors.
 
 Calling Sequence:
 
   dot = vecdot(vec1,vec2);
 
 Parameters:
 
   vec1	: An array of column vectors represented by a matrix of
   vec2	size (dim,nv), where is the dimension of the vector and
 		nv the number of vectors.
 
   dot		: Row vector of scalars, each element corresponding to
 		the dot product of the respective components in vec1 and
 		vec2.
 
 Description:
 
   Scalar dot product of two vectors.
 
 Examples:
 
   Determine the dot product of
   (2.3,3.4,5.6) and (1.2,4.5,1.2)
   (5.1,0.0,2.3) and (2.5,3.2,4.0)

   dot = vecdot([2.3 5.1; 3.4 0.0; 5.6 2.3],[1.2 2.5; 4.5 3.2; 1.2 4.0]);

# name: <cell-element>
# type: string
# elements: 1
# length: 42
 
 VECDOT: The dot product of two vectors.

# name: <cell-element>
# type: string
# elements: 1
# length: 6
vecmag
# name: <cell-element>
# type: string
# elements: 1
# length: 512
 
 VECMAG: Magnitude of the vectors.
 
 Calling Sequence:
 
   mvec = vecmag(vec)
 
 Parameters:
 
   vec		: An array of column vectors represented by a matrix of
 		size (dim,nv), where is the dimension of the vector and
 		nv the number of vectors.
 
   mvec		: Magnitude of the vectors, vector of size (1,nv).
 
 Description:
 
   Determines the magnitude of the vectors.
 
 Examples:
 
   Find the magnitude of the two vectors (0.0,2.0,1.3) and (1.5,3.4,2.3)
 
   mvec = vecmag([0.0 1.5; 2.0 3.4; 1.3 2.3]);

# name: <cell-element>
# type: string
# elements: 1
# length: 36
 
 VECMAG: Magnitude of the vectors.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
vecmag2
# name: <cell-element>
# type: string
# elements: 1
# length: 558
 
 VECMAG2: Squared magnitude of a set of vectors.
 
 Calling Sequence:
 
   mvec = vecmag2(vec)
 
 Parameters:
 
   vec		: An array of column vectors represented by a matrix of
 		size (dim,nv), where dim is the dimension of the vector and
 		nv the number of vectors.
 
   mvec	: Squared magnitude of the vectors, vector of size (1,nv).
 
 Description:
 
   Determines the squared magnitude of the vectors.
 
 Examples:
 
   Find the squared magnitude of the two vectors (0.0,2.0,1.3)
   and (1.5,3.4,2.3)
 
   mvec = vecmag2([0.0 1.5; 2.0 3.4; 1.3 2.3]);

# name: <cell-element>
# type: string
# elements: 1
# length: 50
 
 VECMAG2: Squared magnitude of a set of vectors.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
vecnorm
# name: <cell-element>
# type: string
# elements: 1
# length: 520
 
 VECNORM: Normalise the vectors.
 
 Calling Sequence:
 
   nvec = vecnorn(vec);
 
 Parameters:
 
   vec		: An array of column vectors represented by a matrix of
 		size (dim,nv), where is the dimension of the vector and
 		nv the number of vectors.
 
   nvec		: Normalised vectors, matrix the smae size as vec.
 
 Description:
 
   Normalises the array of vectors, returning the unit vectors.
 
 Examples:
 
   Normalise the two vectors (0.0,2.0,1.3) and (1.5,3.4,2.3)

   nvec = vecnorm([0.0 1.5; 2.0 3.4; 1.3 2.3]);

# name: <cell-element>
# type: string
# elements: 1
# length: 34
 
 VECNORM: Normalise the vectors.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
vecrotx
# name: <cell-element>
# type: string
# elements: 1
# length: 796
 
 VECROTX: Transformation matrix for a rotation around the x axis. 
 
 Calling Sequence:
 
   rx = vecrotx(angle);
 
 Parameters:
 
   angle		: rotation angle defined in radians
 
   rx		: (4x4) Transformation matrix.
 
 
 Description:
 
   Return the (4x4) Transformation matrix for a rotation about the x axis
   by the defined angle.
 
   The matrix is:
 
         [ 1         0            0          0]
         [ 0     cos(angle)  -sin(angle)     0]
         [ 0     sin(angle)   cos(angle)     0]
         [ 0         0            0          1]
 
 Examples:
 
    Rotate the NURBS line (0.0 0.0 0.0) - (3.0 3.0 3.0) by 45 degrees
    around the x-axis
 
    line = nrbline([0.0 0.0 0.0],[3.0 3.0 3.0]);
    trans = vecrotx(%pi/4);
    rline = nrbtform(line, trans);
 
 See:
 
    nrbtform

# name: <cell-element>
# type: string
# elements: 1
# length: 67
 
 VECROTX: Transformation matrix for a rotation around the x axis.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
vecroty
# name: <cell-element>
# type: string
# elements: 1
# length: 836
 
 VECROTY: Transformation matrix for a rotation around the y axis. 
 
 Calling Sequence:
 
   ry = vecroty(angle);
 
 Parameters:
 
   angle		: rotation angle defined in radians
 
   ry		: (4x4) Transformation matrix.
 
 
 Description:
 
   Return the (4x4) Transformation matrix for a rotation about the y axis
   by the defined angle.
 
   The matrix is:
 
         [  cos(angle)       0        sin(angle)       0]
         [      0            1            0            0]
         [ -sin(angle)       0        cos(angle)       0]
         [      0            0            0            1]
 
 Examples:
 
    Rotate the NURBS line (0.0 0.0 0.0) - (3.0 3.0 3.0) by 45 degrees
    around the y-axis
 
    line = nrbline([0.0 0.0 0.0],[3.0 3.0 3.0]);
    trans = vecroty(%pi/4);
    rline = nrbtform(line, trans);
 
 See:
 
    nrbtform

# name: <cell-element>
# type: string
# elements: 1
# length: 67
 
 VECROTY: Transformation matrix for a rotation around the y axis.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
vecrotz
# name: <cell-element>
# type: string
# elements: 1
# length: 823
 
 VECROTZ: Transformation matrix for a rotation around the z axis. 
 
 Calling Sequence:
 
   rz = vecrotz(angle);
 
 Parameters:
 
   angle	: rotation angle defined in radians
 
   rz		: (4x4) Transformation matrix.
 
 
 Description:
 
   Return the (4x4) Transformation matrix for a rotation about the z axis
   by the defined angle.
 
   The matrix is:
 
         [  cos(angle)  -sin(angle)       0          0]
         [ -sin(angle)   cos(angle)       0          0]
         [      0            0            1          0]
         [      0            0            0          1]
 
 Examples:
 
  Rotate the NURBS line (0.0 0.0 0.0) - (3.0 3.0 3.0) by 45 degrees
  around the z-axis
 
    line = nrbline([0.0 0.0 0.0],[3.0 3.0 3.0]);
    trans = vecrotz(%pi/4);
    rline = nrbtform(line, trans);
 
 See:
 
    nrbtform

# name: <cell-element>
# type: string
# elements: 1
# length: 67
 
 VECROTZ: Transformation matrix for a rotation around the z axis.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
vecscale
# name: <cell-element>
# type: string
# elements: 1
# length: 738

 VECSCALE: Transformation matrix for a scaling.
 
 Calling Sequence:
 
   ss = vecscale(svec)
 
 Parameters:
 
   svec    : A vectors defining the scaling along the x,y and z axes.
             i.e. [sx, sy, sy]
 
   ss	    : Scaling Transformation Matrix
 
 Description:
 
   Returns a (4x4) Transformation matrix for scaling.
 
   The matrix is:
 
         [ sx  0   0   0]
         [ 0   sy  0   0]
         [ 0   0   sz  0]
         [ 0   0   0   1]
 
 Example:
 
   Scale up the NURBS line (0.0,0.0,0.0) - (1.0,1.0,1.0) by 3 along
   the x-axis, 2 along the y-axis and 4 along the z-axis.
 
   line = nrbline([0.0 0.0 0.0],[1.0 1.0 1.0]);
   trans = vecscale([3.0 2.0 4.0]);
   sline = nrbtform(line, trans);
 
 See:
 
    nrbtform

# name: <cell-element>
# type: string
# elements: 1
# length: 48

 VECSCALE: Transformation matrix for a scaling.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
vectrans
# name: <cell-element>
# type: string
# elements: 1
# length: 764
 
 VECTRANS: Transformation matrix for a translation.
 
 Calling Sequence:
 
   st = vectrans(tvec)
 
 Parameters:
 
   tvec	: A vectors defining the translation along the x,y and
                   z axes. i.e. [tx, ty, ty]
 
   st		: Translation Transformation Matrix
 
 Description:
 
   Returns a (4x4) Transformation matrix for translation.
 
   The matrix is:
 
         [ 1   0   0   tx ]
         [ 0   0   0   ty ]
         [ 0   0   0   tz ]
         [ 0   0   0   1  ]
 
 Examples:
 
   Translate the NURBS line (0.0,0.0,0.0) - (1.0,1.0,1.0) by 3 along
   the x-axis, 2 along the y-axis and 4 along the z-axis.

   line = nrbline([0.0 0.0 0.0],[1.0 1.0 1.0]);
   trans = vectrans([3.0 2.0 4.0]);
   tline = nrbtform(line, trans);
 
 See:
 
    nrbtform

# name: <cell-element>
# type: string
# elements: 1
# length: 53
 
 VECTRANS: Transformation matrix for a translation.

