# doc-cache created by Octave 5.1.0
# name: cache
# type: cell
# rows: 3
# columns: 76
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
aveknt


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 717
 AVEKNT:  compute the knot averages (Greville points) of a knot vector

 Calling Sequence:
 
   pts = aveknt (knt, p)
   pts = aveknt (nrb)
   
    INPUT:
   
      knt - knot sequence
      p   - spline order (degree + 1)
      nrb - NURBS structure (see nrbmak)
   
    OUTPUT:
   
      pts - average knots. If the input is a NURBS, it gives a cell-array,
        with the average knots in each direction
   
 See also: 

 Copyright (C) 2016 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
 AVEKNT:  compute the knot averages (Greville points) of a knot vector



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
basisfun


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

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

 See also: 

    numbasisfun, basisfunder, findspan

 Copyright (C) 2000 Mark Spink
 Copyright (C) 2007 Daniel Claxton
 Copyright (C) 2009 Carlo de Falco

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
basisfunder


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 795
 BASISFUNDER:  B-Spline Basis function derivatives.

 Calling Sequence:
 
   ders = basisfunder (ii, pl, uu, k, nd)

    INPUT:
   
      ii  - knot span index (see findspan)
      pl  - degree of curve
      uu  - parametric points
      k   - knot vector
      nd  - number of derivatives to compute

    OUTPUT:
   
      ders - ders(n, i, :) (i-1)-th derivative at n-th point
   
    Adapted from Algorithm A2.3 from 'The NURBS BOOK' pg72.

 See also: 

    numbasisfun, basisfun, findspan

    Copyright (C) 2009,2011 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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
basiskntins


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 937
 Compute the coefficient matrix for non-uniform B-splines subdivision.

 This represents the B-spline basis given by a coarse knot vector
  in terms of the B-spline basis of a finer knot vector.

 The function is implemented for the univariate case, based on
  Algorithm A5.4 from 'The NURBS BOOK' pg164.


 Calling Sequence:
 
    S = basiskntins (deg, kc, kf);

    INPUT:
   
      deg - degree of the first knot vector
      kc  - coarse knot vector
      kf  - fine knot vector
   
    OUTPUT:
   
      S - The matrix relating the two spaces, of size (deg-nu, deg-nt) 
           with nu = numel(u)-deg-1, nt = numel(t)-deg-1
   
    Copyright (C) 2015, 2016 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
 Compute the coefficient matrix for non-uniform B-splines subdivision.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
bspdegelev


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 703
 BSPDEGELEV:  Degree elevate a univariate B-Spline. 
 
 Calling Sequence:
 
   [ic,ik] = bspdegelev(d,c,k,t)
 
   INPUT:
 
   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.
 
   OUTPUT:

   ic - Control points of the new B-Spline. 
   ik - Knot vector of the new B-Spline.
 
    Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
bspderiv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 766
 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.

    Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
bspeval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 713
 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)
 
    Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton, 2010 C. de Falco

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
bspinterpcrv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1034

 BSPINTERPCRV: B-Spline interpolation of a 3d curve.

 Calling Sequence:

   crv = bspinterpcrv (Q, p);
   crv = bspinterpcrv (Q, p, method);
   [crv, u] = bspinterpcrv (Q, p);
   [crv, u] = bspinterpcrv (Q, p, method);

    INPUT:

      Q      - points to be interpolated in the form [x_coord; y_coord; z_coord].
      p      - degree of the interpolating curve.
      method - parametrization method. The available choices are:
               'equally_spaced'
               'chord_length'
               'centripetal' (Default)

    OUTPUT:

      crv - the B-Spline curve.
      u   - the parametric points corresponding to the interpolation ones.

    See The NURBS book pag. 364 for more information.


 Copyright (C) 2015 Jacopo Corno

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54

 BSPINTERPCRV: B-Spline interpolation of a 3d curve.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
bspinterpsurf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 898

 BSPINTERPSURF: B-Spline surface interpolation.

 Calling Sequence:
 
   srf = bspinterpsurf (Q, p, method);
   
    INPUT:
   
      X, Y, Z - grid of points to be interpolated. (See ndgrid)
      p       - degree of the interpolating curve ([degree_x, degree_y]).
      method  - parametrization method. The available choices are:
                'equally_spaced'
                'chord_length' (default)
   
    OUTPUT:
   
      srf - the B-Spline surface.
   
    See The NURBS book pag. 376 for more information. As of now only the
    chord length method is implemented.

 Copyright (C) 2015 Jacopo Corno

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49

 BSPINTERPSURF: B-Spline surface interpolation.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
bspkntins


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 860
 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.
 
    Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton, 2010-2016 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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
crvkntremove


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1150
 
 CRVKNTREMOVE: Remove one knot from the knot-vector of a NURBS curve.
 
 Calling Sequence:
 
   [rcrv, remflag] = crvkntremove (crv, u, r, s, num, d);
 
 INPUT:
 
   crv		: NURBS curve, see nrbmak.
 
   u           : knot to be removed.
 
   r           : index of the knot to be removed.
 
   s           : multiplicity of the knot to be removed.
 
   num         : number of knot removals requested.

   d           : curve deviation tolerance.

 OUTPUT:

   rcrv        : new NURBS structure for the curve with knot u remuved.
 
   t           : actual number of knot removals performed.
 
 
 
 DESCRIPTION:
 
   Remove knot u from the NURBS curve crv at most num times. 
   Check that the maximum deviation of the curve be less than d.
   Based on algorithm A5.8 NURBS Book (pag183)
  
 SEE ALSO:
 
   nrbkntins

    Copyright (C) 2013 Jacopo Corno
    Copyright (C) 2013 Carlo de Falco

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
 
 CRVKNTREMOVE: Remove one knot from the knot-vector of a NURBS curve.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
curvederivcpts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 970
 Compute control points of n-th derivatives of a B-spline curve.
 
 usage: pk = curvederivcpts (n, p, U, P, d) 
        pk = curvederivcpts (n, p, U, P, d, r1, r2) 

 If r1, r2 are not given, all the control points are computed.

  INPUT:
         n+1 = number of control points
         p   = degree of the spline
         d   = maximum derivative order (d<=p)
         U   = knots
         P   = control points
         r1  = first control point to compute
         r2  = auxiliary index for the last control point to compute
  OUTPUT:
         pk(k,i) = i-th control point of (k-1)-th derivative, r1 <= i <= r2-k

 Adaptation of algorithm A3.3 from the NURBS book, pg98.

    Copyright (C) 2009 Carlo de Falco

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
 Compute control points of n-th derivatives of a B-spline curve.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
curvederiveval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 754

 CURVEDERIVEVAL: Compute the derivatives of a B-spline curve.
 
 usage: ck = curvederiveval (n, p, U, P, u, d) 

  INPUT: 

        n+1 = number of control points
        p   = spline order
        U   = knots
        P   = control points
        u   = evaluation point
        d   = derivative order

  OUTPUT:

        ck (k+1) =  curve differentiated k times

 Adaptation of algorithm A3.4 from the NURBS book, pg99

    Copyright (C) 2009 Carlo de Falco
    Copyright (C) 2010 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62

 CURVEDERIVEVAL: Compute the derivatives of a B-spline curve.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
findspan


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 634
 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
 
  OUTPUT:
 
    s - knot span index

  Modification of Algorithm A2.1 from 'The NURBS BOOK' pg68

    Copyright (C) 2010 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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
kntbrkdegmult


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 917
 KNTBRKDEGMULT: Construct an open knot vector by giving the sequence of
                knots, the degree and the multiplicity.

   knots = kntbrkdegreg (breaks, degree)
   knots = kntbrkdegreg (breaks, degree, mult)

 INPUT:

     breaks:  sequence of knots.
     degree:  polynomial degree of the splines associated to the knot vector.
     mult:    multiplicity of the knots.

 OUTPUT:

     knots:  knot vector.

 If MULT has as many entries as BREAKS, or as the number of interior
   knots, a different multiplicity will be assigned to each knot. If
   MULT is not present, it will be taken equal to 1.

 Copyright (C) 2010 Carlo de Falco, 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 KNTBRKDEGMULT: Construct an open knot vector by giving the sequence of
     ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
kntbrkdegreg


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 939
 KNTBRKDEGREG: Construct an open knot vector by giving the sequence of
                knots, the degree and the regularity.

   knots = kntbrkdegreg (breaks, degree)
   knots = kntbrkdegreg (breaks, degree, regularity)

 INPUT:

     breaks:     sequence of knots.
     degree:     polynomial degree of the splines associated to the knot vector.
     regularity: splines regularity.

 OUTPUT:

     knots:  knot vector.

 If REGULARITY has as many entries as BREAKS, or as the number of interior
   knots, a different regularity will be assigned to each knot. If
   REGULARITY is not present, it will be taken equal to DEGREE-1.

 Copyright (C) 2010 Carlo de Falco, 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 KNTBRKDEGREG: Construct an open knot vector by giving the sequence of
      ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
kntrefine


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1327
 KNTREFINE: Refine a given knot vector by dividing each interval uniformly,
             maintaining the continuity in previously existing knots.

   [rknots]                  = kntrefine (knots, n_sub, degree, regularity)
   [rknots, zeta]            = kntrefine (knots, n_sub, degree, regularity)
   [rknots, zeta, new_knots] = kntrefine (knots, n_sub, degree, regularity)

 INPUT:

     knots:      initial knot vector.
     n_sub:      number of new knots to be added in each interval.
     degree:     polynomial degree of the refined knot vector
     regularity: maximum global regularity 

 OUTPUT:

     rknots:    refined knot vector
     zeta:      refined knot vector without repetitions
     new_knots: new knots, to apply the knot insertion

 The regularity at the new inserted knots is the one given by the user.
 At previously existing knots, the regularity is the minimum
  between the previous regularity, and the one given by the user.
  This ensures optimal convergence rates in the context of IGA.

 Copyright (C) 2010 Carlo de Falco, 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 KNTREFINE: Refine a given knot vector by dividing each interval uniformly,
 ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
kntuniform


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 716
 KNTUNIFORM: generate uniform open knot vectors in the reference domain.

   [csi, zeta] = kntuniform (num, degree, regularity)

 INPUT:
     
     num:        number of breaks (in each direction)
     degree:     polynomial degree (in each direction)
     regularity: global regularity (in each direction)

 OUTPUT:

     csi:  knots
     zeta: breaks = knots without repetitions
 
 Copyright (C) 2009, 2010 Carlo de Falco
 Copyright (C) 2011 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
 KNTUNIFORM: generate uniform open knot vectors in the reference domain.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrb2iges


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 736
 NRB2IGES : Write a NURBS curve or surface to an IGES file.

 Calling Sequence:
 
   nrb2iges (nurbs, filename);
 
 INPUT:
 
   nurbs    : NURBS curve or surface, see nrbmak.
   filename : name of the output file.
  
 Description:
 
   The data of the nurbs structure is written in a file following the IGES
   format. For a more in-depth explanation see, for example:
   <http://engineeronadisk.com/V2/notes_design/engineeronadisk-76.html>.

    Copyright (C) 2014 Jacopo Corno

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
 NRB2IGES : Write a NURBS curve or surface to an IGES file.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrb4surf


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1088
 
 NRB4SURF: Constructs a NURBS bilinear surface.
 
 Calling Sequence:
 
   srf = nrb4surf(p11,p12,p21,p22)
 
 INPUT:
 
   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.

 OUTPUT:
 
   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
 

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
nrbbasisfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1344
 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 (pts, srf)
   [B, N] = nrbbasisfun ({u, v, w}, vol)
   [B, N] = nrbbasisfun (pts, vol)

    INPUT:
   
      u   - parametric coordinates along u direction
      v   - parametric coordinates along v direction
      w   - parametric coordinates along w direction
      pts - array of scattered points in parametric domain, array size: (ndim,num_points)
      crv - NURBS curve
      srf - NURBS surface
      vol - NURBS volume
   
    If the parametric coordinates are given in a cell-array, the values
     are computed in a tensor product set of points

    OUTPUT:
   
      B - Value of the basis functions at the points
          size(B)=[npts, prod(nrb.order)]

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

    Copyright (C) 2009 Carlo de Falco
    Copyright (C) 2015 Jacopo Corno
    Copyright (C) 2016 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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
nrbbasisfunder


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1597
 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 (pts, srf)
   [Bu, Bv, Bw, N] = nrbbasisfunder ({u, v, w}, vol)
   [Bu, Bv, Bw, N] = nrbbasisfunder (pts, vol)

    INPUT:
   
      u   - parametric coordinates along u direction
      v   - parametric coordinates along v direction
      w   - parametric coordinates along w direction
      pts - array of scattered points in parametric domain, array size: (ndim,num_points)
      crv - NURBS curve
      srf - NURBS surface
      vol - NURBS volume

    If the parametric coordinates are given in a cell-array, the values
     are computed in a tensor product set of points
   
    OUTPUT:
   
      Bu - Basis functions derivatives WRT direction u
           size(Bu)=[npts, prod(nrb.order)]

      Bv - Basis functions derivatives WRT direction v
           size(Bv) == size(Bu)

      Bw - Basis functions derivatives WRT direction w
           size(Bw) == size(Bu)

      N - Indices of the basis functions that are nonvanishing at each
          point. size(N) == size(Bu)
   
    Copyright (C) 2009 Carlo de Falco
    Copyright (C) 2016 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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nrbcirc


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 999
 
 NRBCIRC: Construct a circular arc.
 
 Calling Sequence:
 
   crv = nrbcirc()
   crv = nrbcirc(radius)
   crv = nrbcirc(radius,center)
   crv = nrbcirc(radius,center,sang,eang)
 
 INPUT:
 
   radius	: Radius of the circle, default 1.0
 
   center	: Center of the circle, default (0,0,0)
 
   sang	: Start angle, default 0 radians (0 degrees)
 
   eang	: End angle, default 2*pi radians (360 degrees)
 
 OUTPUT:

   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.

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrbclamp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 945
 NRBCLAMP: Compute the knot vector and control points of the clamped curve/surface.

 Calling Sequence:
 
   ccrv = nrbrclamp (crv)
   ccrv = nrbrclamp (crv, k)
   ccrv = nrbrclamp (crv, k, dim)
 
 INPUT:
 
   crv	: unclamped NURBS curve or surface, see nrbmak.
   k   : continuity desired afterclamping (from -1 up to p-1, -1 by default)
   dim : dimension in which to clamp (all by default).

 OUTPUT:
 
   ccrv: NURBS curve with clamped knot vector, see nrbmak
 
 Description:
 
   Clamps a curve or surface, using an open knot vector. Computes the new
     knot vector and control points by knot insertion.
 
    Copyright (C) 2016 Monica Montardini, Filippo Remonato, 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 NRBCLAMP: Compute the knot vector and control points of the clamped curve/su...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrbcoons


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2143
 
 NRBCOONS: Construction of a Coons patch.
 
 Calling Sequence:
 
   srf = nrbcoons(ucrv1, ucrv2, vcrv1, vcrv2)
 
 INPUT:
 
   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.

 OUTPUT:
 
   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);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
nrbcrvderiveval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 752
 NRBCRVDERIVEVAL: Evaluate n-th order derivatives of a NURBS curve.

 usage: skl = nrbcrvderiveval (crv, u, d) 

   INPUT:

   crv : NURBS curve structure, see nrbmak

   u   : parametric coordinate of the points where we compute the derivatives

   d   : number of partial derivatives to compute


   OUTPUT: 

   ck (i, j, l) = i-th component derived j-1 times at the l-th point.

 Adaptation of algorithm A4.2 from the NURBS book, pg127

    Copyright (C) 2010 Carlo de Falco, 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
 NRBCRVDERIVEVAL: Evaluate n-th order derivatives of a NURBS curve.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
nrbctrlplot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 676
 NRBCTRLPLOT: Plot a NURBS entity along with its control points.
 
 Calling Sequence:
 
   nrbctrlplot (nurbs)
 
 INPUT:
 
   nurbs: NURBS curve, surface or volume, see nrbmak.
 
 Example:

   Plot the test curve and test surface with their control polygon and
    control net, respectively

   nrbctrlplot(nrbtestcrv)
   nrbctrlplot(nrbtestsrf)

 See also:
 
   nrbkntplot

    Copyright (C) 2011, 2012 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
 NRBCTRLPLOT: Plot a NURBS entity along with its control points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
nrbcylind


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 988
 
 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)
 
 INPUT:
 
   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.

 OUTPUT: 

   srf     : cylindrical surface patch 
 
 Description:
 
   Construct a cylinder or cylindrical patch by extruding a circular arc.

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbdegelev


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1411
 
 NRBDEGELEV: Elevate the degree of the NURBS curve, surface or volume.
 
 Calling Sequence:
 
   ecrv = nrbdegelev(crv,utimes);
   esrf = nrbdegelev(srf,[utimes,vtimes]);
   evol = nrbdegelev(vol,[utimes,vtimes,wtimes]);
 
 INPUT:
 
   crv		: NURBS curve, see nrbmak.
 
   srf		: NURBS surface, see nrbmak.
 
   vol		: NURBS volume, see nrbmak.
 
   utimes	: Increase the degree along U direction utimes.
 
   vtimes	: Increase the degree along V direction vtimes.
 
   wtimes	: Increase the degree along W direction vtimes.

 OUTPUT:

   ecrv	: new NURBS structure for a curve with degree elevated.
 
   esrf	: new NURBS structure for a surface with degree elevated.
 
   evol	: new NURBS structure for a volume 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, 2]); 
 
 See also:
 
   bspdegelev

    Copyright (C) 2000 Mark Spink, 2010 Rafel 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
 
 NRBDEGELEV: Elevate the degree of the NURBS curve, surface or volume.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrbderiv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1370
 
 NRBDERIV: Construct the first and second derivative representation of a
           NURBS curve, surface or volume.
 
 Calling Sequence:
 
   ders = nrbderiv (nrb);
   [ders, ders2] = nrbderiv (nrb);
 
 INPUT:
 
   nrb		: NURBS data structure, see nrbmak.

 OUTPUT:
 
   ders:  A data structure that represents the first
 		    derivatives of a NURBS curve, surface or volume.
   ders2: A data structure that represents the second
 		    derivatives of a NURBS curve, surface or volume.
 
 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 more complex. We have followed in this function the same idea
   that was already used for the first derivative in the function nrbderiv.
   The second derivative data structure can be evaluated later with the
   function nrbdeval.
 
 See also:
 
       nrbdeval

 Copyright (C) 2000 Mark Spink
 Copyright (C) 2010 Carlo de Falco
 Copyright (C) 2010, 2011 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 
 NRBDERIV: Construct the first and second derivative representation of a
  ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrbdeval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1425
 NRBDEVAL: Evaluation of the derivative and second derivatives of NURBS curve, surface or volume.

     [pnt, jac] = nrbdeval (crv, dcrv, tt)
     [pnt, jac] = nrbdeval (srf, dsrf, {tu tv})
     [pnt, jac] = nrbdeval (vol, dvol, {tu tv tw})
     [pnt, jac, hess] = nrbdeval (crv, dcrv, dcrv2, tt)
     [pnt, jac, hess] = nrbdeval (srf, dsrf, dsrf2, {tu tv})
     [pnt, jac, hess] = nrbdeval (vol, dvol, dvol2, {tu tv tw})

 INPUTS:

   crv,   srf,   vol   - original NURBS curve, surface or volume.
   dcrv,  dsrf,  dvol  - NURBS derivative representation of crv, srf 
                          or vol (see nrbderiv2)
   dcrv2, dsrf2, dvol2 - NURBS second derivative representation of crv,
                          srf or vol (see nrbderiv2)
   tt     - parametric evaluation points
            If the nurbs is a surface or a volume then tt is a cell
            {tu, tv} or {tu, tv, tw} are the parametric coordinates

 OUTPUT:

   pnt  - evaluated points.
   jac  - evaluated first derivatives (Jacobian).
   hess - evaluated second derivatives (Hessian).

 Copyright (C) 2000 Mark Spink 
 Copyright (C) 2010 Carlo de Falco
 Copyright (C) 2010, 2011 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 NRBDEVAL: Evaluation of the derivative and second derivatives of NURBS curve...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nrbeval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1809
 
 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
 
 NRBEVAL: Evaluate a NURBS at parametric points.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
nrbeval_der_p


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1162

 NRBEVAL_DER_P: Compute the derivative of a NURBS object at a given point 
 with respect to the coordinates of the i-th control point.

 Calling Sequence:
 
   der = nrbeval_der_p (crv, i, u);
   der = nrbeval_der_p (srf, i, p);
   der = nrbeval_der_p (srf, i, {u v});
   der = nrbeval_der_p (vol, i, p);
   der = nrbeval_der_p (vol, i, {u v w});

 INPUT:
 
   crv	   - NURBS curve.
   srf	   - NURBS surface.
   vol	   - NURBS volume.
   i      - Index of the control point.
   u or p(1,:,:)  - parametric points along u direction
   v or p(2,:,:)  - parametric points along v direction
   w or p(3,:,:)  - parametric points along w direction

 OUTPUT:

   der - Derivative.
          size(der) = numel(u) for curves
          or          numel(u)*numel(v) for surfaces
          or          numel(u)*numel(v)*numel(w) for volumes
   
 Copyright (C) 2015 Jacopo Corno

    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.



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

 NRBEVAL_DER_P: Compute the derivative of a NURBS object at a given point 
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
nrbeval_der_w


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1172

 NRBEVAL_DER_W: Compute the derivatives of a NURBS object at the point u 
 with respect to the weight of the i-th control point.

 Calling Sequence:
 
   der = nrbeval_der_p (crv, i, u);
   der = nrbeval_der_p (srf, i, p);
   der = nrbeval_der_p (srf, i, {u v});
   der = nrbeval_der_p (vol, i, p);
   der = nrbeval_der_p (vol, i, {u v w});

 INPUT:
 
   crv	   - NURBS curve.
   srf	   - NURBS surface.
   vol	   - NURBS volume.
   i      - Index of the control point.
   u or p(1,:,:)  - parametric points along u direction
   v or p(2,:,:)  - parametric points along v direction
   w or p(3,:,:)  - parametric points along w direction

 OUTPUT:

   der - Derivatives.
          size(der) = [3, numel(u)] for curves
          or          [3, numel(u)*numel(v)] for surfaces
          or          [3, numel(u)*numel(v)*numel(w)] for volumes
   
 Copyright (C) 2015 Jacopo Corno

    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.



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

 NRBEVAL_DER_W: Compute the derivatives of a NURBS object at the point u 
...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
nrbexport


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1378

 NRBEXPORT: export NURBS geometries to a format compatible with the one used in GeoPDEs.
 
 Calling Sequence:
 
   nrbexport (nurbs, filename);
   nrbexport (nurbs, interfaces, boundaries, filename);
   nrbexport (nurbs, interfaces, boundaries, subdomains, filename);
   nrbexport (nurbs, filename, version);
   nrbexport (nurbs, interfaces, boundaries, filename, version);
   nrbexport (nurbs, interfaces, boundaries, subdomains, filename, version);
 
 INPUT:
 
   nurbs    :  NURBS curve, surface or volume, see nrbmak.
   interfaces: interface information for GeoPDEs (see nrbmultipatch)
   boundaries: boundary information for GeoPDEs (see nrbmultipatch)
   filename :  name of the output file.
   version  :  either '-V0.7' or '-V2.1', to select the file format
 
 
 Description:
 
   The data of the nurbs structure is written in the file, in a format 
     that can be read by GeoPDEs. By default, the file is saved in the
     format used by GeoPDEs 2.1. For the format of GeoPDEs 2.0 use the
     option '-v0.7'. Earlier versions of GeoPDEs are not supported.

    Copyright (C) 2011, 2014, 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.



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

 NRBEXPORT: export NURBS geometries to a format compatible with the one used...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbextract


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1218

 NRBEXTRACT: construct NURBS curves by extracting the boundaries of a NURBS surface, or NURBS surfaces by extracting the boundary of a NURBS volume.
 It only works for geometries constructed with open knot vectors. For a NURBS curve, 
 it returns two structures with the the boundary knots and control points.
 
 Calling Sequence:
 
   crvs = nrbextract(surf);
 
 INPUT:
 
   surf        : NURBS surface or volume, see nrbmak.
 
 OUTPUT: 
 
   crvs        : array of NURBS curves or NURBS surfaces extracted.
 
 Description:
 
  Constructs either an array of four NURBS curves, by extracting the boundaries
  of a NURBS surface, or an array of six surfaces, by extracting the boundaries
  of a NURBS volume. The new entities are ordered in the following way

    1: U = 0
    2: U = 1
    3: V = 0
    4: V = 1
    5: W = 0 (only for volumes)
    6: W = 1 (only for volumes)

    Copyright (C) 2010,2014,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.



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

 NRBEXTRACT: construct NURBS curves by extracting the boundaries of a NURBS...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1283

 NRBEXTRUDE: Construct a NURBS surface by extruding a NURBS curve, or 
  construct a NURBS volume by extruding a NURBS surface.
 
 Calling Sequence:
 
   srf = nrbextrude(crv,vec);
 
 INPUT:
 
   crv		: NURBS curve or surface to extrude, see nrbmak.
 
   vec		: Vector along which the entity is extruded.

 OUTPUT: 
 
   srf		: NURBS surface or volume constructed.
 
 Description:
 
   Constructs either a NURBS surface by extruding a NURBS curve along a  
   defined vector, or a NURBS volume by extruding a NURBS surface. In the 
   first case, the NURBS curve forms the U direction of the surface edge, and
   is extruded along the vector in the V direction. In the second case, the 
   original surface forms the U and V direction of the volume, and is extruded
   along the W direction.

 Examples:
 
   Form a hollow cylinder by extruding a circle along the z-axis.

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

    Copyright (C) 2000 Mark Spink
    Copyright (C) 2010 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.



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

 NRBEXTRUDE: Construct a NURBS surface by extruding a NURBS curve, or 
  c...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbinverse


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1176

 NRBINVERSE: compute parametric point starting from physical point by
 inverting the NURBS map with a Newton scheme

 Calling Sequence:

   u = nrbinverse (nrb, x)
   u = nrbinverse (nrb, x, options)

    INPUT:

      nrb     - NURBS object
      x       - physical point
      options - options in the FIELD/VALUE format. Possible choices:
        'u0'      : starting point in the parametric domain for Newton 
                    (Default = .5 * ones (ndim, 1))
        'MaxIter' : maximum number of Newton iterations (Default = 10)
        'Display' : if true the some info are shown (Default = true)
        'TolX'    : tolerance for the step size in Newton iterations
                    (Default = 1e-8)
        'TolFun'  : tolerance for the residual in Newton iterations
                    (Default = 1e-8)

    OUTPUT:

      u   - the parametric points corresponding to x

 Copyright (C) 2016 Jacopo Corno

    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.



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

 NRBINVERSE: compute parametric point starting from physical point by
 inver...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
nrbkntins


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2029
 
 NRBKNTINS: Insert a single or multiple knots into a NURBS curve,
            surface or volume.
 
 Calling Sequence:
 
   icrv = nrbkntins(crv,iuknots);
   isrf = nrbkntins(srf,{iuknots ivknots});
   ivol = nrbkntins(vol,{iuknots ivknots iwknots});
 
 INPUT:
 
   crv		: NURBS curve, see nrbmak.
 
   srf		: NURBS surface, see nrbmak.
 
   srf		: NURBS volume, see nrbmak.
 
   iuknots	: Knots to be inserted along U direction.
 
   ivknots	: Knots to be inserted along V direction.
 
   iwknots	: Knots to be inserted along W direction.
 
 OUTPUT:
 
   icrv	: new NURBS structure for a curve with knots inserted.
 
   isrf	: new NURBS structure for a surface with knots inserted.
 
   ivol	: new NURBS structure for a volume 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]})
 
 See also:
 
   bspkntins

 Note:

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

    Copyright (C) 2000 Mark Spink, 2010 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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbkntplot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 588
 NRBKNTPLOT: Plot a NURBS entity with the knots subdivision.
 
 Calling Sequence:
 
   nrbkntplot(nurbs)
 
 INPUT:
 
   nurbs: NURBS curve, surface or volume, see nrbmak.
 
 Example:

   Plot the test surface with its knot vector

   nrbkntplot(nrbtestsrf)

 See also:
 
   nrbctrlplot

    Copyright (C) 2011, 2012 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
 NRBKNTPLOT: Plot a NURBS entity with the knots subdivision.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nrbline


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 762
 
 NRBLINE: Construct a straight line.
 
 Calling Sequence:
 
   crv = nrbline()
   crv = nrbline(p1,p2)
 
 INPUT:
 
 p1		: 2D or 3D cartesian coordinate of the start point.
 
 p2            : 2D or 3D cartesian coordinate of the end point.

 OUTPUT:
 
 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.

    Copyright (C) 2000 Mark Spink

    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.



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3966

 NRBMAK: Construct the NURBS structure given the control points
            and the knots.
 
 Calling Sequence:
 
   nurbs   = nrbmak(cntrl,knots);
 
 INPUT:
 
   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), for a surface a multidimensional
 		array of size (dim,nu,nv), for a volume a multidimensional array
 		of size (dim,nu,nv,nw). Where nu is number of points along
 		the parametric U direction, nv the number of points along
 		the V direction and nw the number of points along the W 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 geometric entities
               are clamped to the start and end control points by knot
               multiplicities equal to the spline order (open knot vector).
               For curve knots form a vector and for surfaces (volumes)
               the knots are stored by two (three) vectors for U and V (and W)
               in a cell structure {uknots vknots} ({uknots vknots wknots}).
               
 OUTPUT:
 
   nurbs 	: Data structure for representing a NURBS entity
 
 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 order is a vector [du,dv] containing the order
   along the U and V directions respectively. For a volume the order is
   a vector [du dv dw]. Recall that order = degree + 1.
 
 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]);

    Copyright (C) 2000 Mark Spink, 2010 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.



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

 NRBMAK: Construct the NURBS structure given the control points
          ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbmeasure


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1359
 NRBMEASURE: Compute the distance between two given points along a NURBS curve.
 
 Calling Sequence:
 
  [dist, ddistds, ddistde] = nrbmeasure (nrb)
  [dist, ddistds, ddistde] = nrbmeasure (nrb, s, e)
  [dist, ddistds, ddistde] = nrbmeasure (nrb, s, e, tol)
 
 INPUT:
 
   nrb	: a NURBS curve, see nrbmak.
   s   : starting point in the parametric domain.
   e   : ending point in the parametric domain.
   tol : tolerance for numerical quadrature, to be used in quad.
 
 OUTPUT:
 
   dist   : distance between the two points along the NURBS curve.
   ddistds: derivative of the distance function with respect to the point s.
   ddistde: derivative of the distance function with respect to the point e.
 
 Description:
 
   Compute the distance between two given points along a NURBS curve, using 
   quad for numerical integration. The points are given by their coordinates
   in the parametric domain.

 Examples:

  Compute the length of a circular arc constructed as a NURBS.

   c = nrbcirc (1, [0 0], 0, pi/2);
   s = 0; e = 1;
   l = nrbmeasure (c, s, e, 1e-7);

 Copyright (C) 2013 Carlo de Falco
 
   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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79
 NRBMEASURE: Compute the distance between two given points along a NURBS curve.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nrbmodp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 705

 NRBMODP: Modify the coordinates of specific control points of any NURBS
 map. The weight is not changed.

 Calling Sequence:
 
   nrb = nrbmodp (nrb, move, index);
   
    INPUT:
   
      nrb   - NURBS map to be modified.
      move  - vector specifying the displacement of all the ctrl points.
      index - indeces of the control points to be modified.
   
    OUTPUT:
   
      mnrb - the modified NURBS.
   
 Copyright (C) 2015 Jacopo Corno

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79

 NRBMODP: Modify the coordinates of specific control points of any NURBS
 map.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nrbmodw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 673

 NRBMODW: Modify the weights of specific control points of any NURBS map.

 Calling Sequence:
 
   nrb = nrbmodw (nrb, new_w, index);
   
    INPUT:
   
      nrb   - NURBS map to be modified.
      new_w - vector specifying the new weigths.
      index - indices of the control points to be modified.
   
    OUTPUT:
   
      mnrb - the modified NURBS.
   
 Copyright (C) 2015 Jacopo Corno

    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.



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

 NRBMODW: Modify the weights of specific control points of any NURBS map.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
nrbmultipatch


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1567

 NRBMULTIPATCH: construct the information for gluing conforming NURBS patches, using the same format as in GeoPDEs.
 
 Calling Sequence:
 
   [interfaces, boundary] = nrbmultipatch (nurbs);
 
 INPUT:
 
   nurbs   : an array of NURBS surfaces or volumes (not both), see nrbmak.
 
 OUTPUT: 
 
   interfaces: array with the information for each interface, that is:
      - number of the first patch (patch1), and the local side number (side1)
      - number of the second patch (patch2), and the local side number (side2)
      - flag (faces and volumes), ornt1, ornt2 (only volumes): information
        on how the two patches match, see below.
   boundary:   array with the boundary faces that do not belong to any interface
      - nsides:  total number of sides on the boundary array (numel(boundary))
      - patches: number of the patch to which the boundary belongs
      - sides:   number of the local side on the patch

 The faces of two patches must match conformingly: the control points must be the same,
  with the knot vectors (in each direction) related by an affine transformation.

 The boundary faces are stored separately, that is, nsides=1 for each boundary.
  To join several faces under the same condition, the user should do it by hand.
 
    Copyright (C) 2014, 2015, 2016 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.



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

 NRBMULTIPATCH: construct the information for gluing conforming NURBS patche...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
nrbnumbasisfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1015

 NRBNUMBASISFUN:  Numbering of basis functions for NURBS

 Calling Sequence:
 
   N      = nrbnumbasisfun (u, crv)
   N      = nrbnumbasisfun ({u, v}, srf)
   N      = nrbnumbasisfun (p, srf)
   N      = nrbnumbasisfun ({u, v, w}, vol)
   N      = nrbnumbasisfun (p, vol)

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

      N - Indices of the basis functions that are nonvanishing at each
          point. size(N) == [npts, prod(nrb.order)]

    Copyright (C) 2009 Carlo de Falco
    Copyright (C) 2016 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57

 NRBNUMBASISFUN:  Numbering of basis functions for NURBS



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbpermute


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 874
 
 NRBPERMUTE: Rearrange the directions of a NURBS volume or surface.
 
 Calling Sequence:
 
   tvol = nrbpermute(vol,order)

 INPUT:
 
   vol		: NURBS volume or surface, see nrbmak.
   order   : the order to rearrange the directions of the NURBS entity.

 OUTPUT:
 
   tvol	: NURBS volume or surface with rearranged directions.
 
 Description:
 
   Utility function that rearranges the directions of a NURBS volume or
   surface. For surfaces, nrbpermute(srf,[2 1]) is the same as
   nrbtransp(srf). NURBS curves cannot be rearranged.

 Example:

    nrbpermute (vol, [1 3 2])

    Copyright (C) 2013 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
 
 NRBPERMUTE: Rearrange the directions of a NURBS volume or surface.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nrbplot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1155
 
 NRBPLOT: Plot a NURBS curve or surface, or the boundary of a NURBS volume.
 
 Calling Sequence:
 
   nrbplot (nrb, subd)
   nrbplot (nrb, subd, p, v)
 
 INPUT:
 
   nrb		: NURBS curve, surface or volume, see nrbmak.
 
   npnts	: Number of evaluation points, for a surface or volume, a row 
       vector with the number of points along each direction.
 
   [p,v]       : property/value options

               Valid property/value pairs include:

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

 Example:

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

   nrbplot(nrbtestsrf, [20 30])

    Copyright (C) 2000 Mark Spink
    Copyright (C) 2010 Carlo de Falco, Rafael Vazquez
    Copyright (C) 2012 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
 
 NRBPLOT: Plot a NURBS curve or surface, or the boundary of a NURBS volume.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nrbrect


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 854
 
 NRBRECT: Construct NURBS representation of a rectangular curve.
 
 Calling Sequence:
 
   crv = nrbrect()
   crv = nrbrect(size)
   crv = nrbrect(width, height)
 
 INPUT:
 
   size	: Size of the square (width = height).
 
   width	: Width of the rectangle (along x-axis).
 
   height	: Height of the rectangle (along y-axis).

 OUTPUT:

   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.

    Copyright (C) 2000 Mark Spink

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
 
 NRBRECT: Construct NURBS representation of a rectangular curve.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 732

 NRBREVERSE: Reverse the evaluation directions of a NURBS geometry.
 
 Calling Sequence:
 
   rnrb = nrbreverse(nrb);
   rnrb = nrbreverse(nrb, idir);
 
 INPUT:
 
   nrb		: NURBS data structure, see nrbmak.
   idir        : vector of directions to reverse.

 OUTPUT:
 
   rnrb	: Reversed NURBS.
 
 Description:
 
   Utility function to reverse the evaluation direction of a NURBS
   curve or surface.

    Copyright (C) 2000 Mark Spink
    Copyright (C) 2013 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68

 NRBREVERSE: Reverse the evaluation directions of a NURBS geometry.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbrevolve


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1774
 
 NRBREVOLVE: Construct a NURBS surface by revolving a NURBS curve, or
  construct a NURBS volume by revolving a NURBS surface.
 
 Calling Sequence:
 
   srf = nrbrevolve(crv,pnt,vec[,ang])
 
 INPUT:
 
   crv		: NURBS curve or surface to revolve, see nrbmak.
 
   pnt		: Coordinates 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

 OUTPUT:

   srf		: constructed surface or volume
 
 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.


    Copyright (C) 2000 Mark Spink
    Copyright (C) 2010 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 
 NRBREVOLVE: Construct a NURBS surface by revolving a NURBS curve, or
  c...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrbruled


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 892
 NRBRULED: Construct a ruled surface between two NURBS curves.
 
 Calling Sequence:
 
   srf = nrbruled(crv1, crv2)
 
 INPUT:
 
   crv1	: First NURBS curve, see nrbmak.
 
   crv2	: Second NURBS curve, see nrbmak.

 OUTPUT:
 
   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]);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
nrbsquare


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 927

 NRBSQUARE: create the NURBS surface for a square.

 Calling Sequence:
 
 srf = nrbsquare (corner, lengthx, lengthy);
 srf = nrbsquare (corner, lengthx, lengthy, degree);
 srf = nrbsquare (corner, lengthx, lengthy, degree, nsub);

 INPUT:
   corner  : the coordinates of the bottom left corner of the square. 
   lenghtx : the length along the x direction.
   lenghty : the length along the y direction.
   degree  : the degree of the NURBS surface, in each direction.
   nsub    : the number of subdivision of the NURBS surface, in each direction.

 OUTPUT:
   srf     : the NURBS surface.

    Copyright (C) 2016 Jacopo Corno, 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52

 NRBSQUARE: create the NURBS surface for a square.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
nrbsurfderiveval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 772

 NRBSURFDERIVEVAL: Evaluate n-th order derivatives of a NURBS surface

 usage: skl = nrbsurfderiveval (srf, [u; v], d) 

   INPUT:

   srf   : NURBS surface structure, see nrbmak

   u, v  : parametric coordinates of the point where we compute the
      derivatives

   d     : number of partial derivatives to compute


   OUTPUT: 

   skl (i, j, k, l) = i-th component derived j-1,k-1 times at the
     l-th point.

 Adaptation of algorithm A4.4 from the NURBS book, pg137

    Copyright (C) 2009 Carlo de Falco

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70

 NRBSURFDERIVEVAL: Evaluate n-th order derivatives of a NURBS surface



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbtestcrv


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

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbtestsrf


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

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
nrbtform


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1313
 
 NRBTFORM: Apply transformation matrix to the NURBS.
 
 Calling Sequence:
 
   tnurbs = nrbtform(nurbs,tmatrix);
 
 INPUT:
 
   nurbs	: NURBS data structure (see nrbmak for details).
 
   tmatrix     : Transformation matrix, a matrix of size (4,4) defining
                 a single or multiple transformations.

 OUTPUT:

   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 simply constructed by the functions
   vecscale, vectrans and vecrot, and also vecrotx, vecroty, and vecrotz.
     
 Examples:
 
   Rotate a square by 45 degrees about the z axis.

   rsqr = nrbtform(nrbrect(), vecrotz(45*pi/180));
   nrbplot(rsqr, 1000);
 
 See also:
 
   vecscale, vectrans, vecrot, vecrotx, vecroty, vecrotz

    Copyright (C) 2000 Mark Spink
    Copyright (C) 2010 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
 
 NRBTFORM: Apply transformation matrix to the NURBS.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
nrbtransp


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

 INPUT:
 
   srf		: NURBS surface, see nrbmak.

 OUTPUT:
 
   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.

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
nrbunclamp


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 937
 NRBUNCLAMP: Compute the knot vector and control points of the unclamped curve or surface.

 Calling Sequence:
 
   ucrv = nrbrunclamp (crv, k)
   ucrv = nrbrunclamp (crv, k, dim)
 
 INPUT:
 
   crv	: NURBS curve or surface, see nrbmak.
   k   : continuity for the unclamping (from 0 up to p-1)
   dim : dimension in which to unclamp (all by default).

 OUTPUT:
 
   ucrv: NURBS curve with unclamped knot vector, see nrbmak
 
 Description:
 
   Unclamps a curve, removing the open knot vector. Computes the new
     knot vector and control points of the unclamped curve.

    Adapted from Algorithm A12.1 from 'The NURBS BOOK' pg577.
 
    Copyright (C) 2013, 2014 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 NRBUNCLAMP: Compute the knot vector and control points of the unclamped curv...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
numbasisfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 666
 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))
   
 See also: 

    basisfun, basisfunder

    Copyright (C) 2009 Carlo de Falco

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
surfderivcpts


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 933

 SURFDERIVCPTS: Compute control points of n-th derivatives of a NURBS surface.
 
 usage: pkl = surfderivcpts (n, p, U, m, q, V, P, d) 

  INPUT: 

        n+1, m+1 = number of control points
        p, q     = spline order
        U, V     = knots
        P        = control points
        d        = derivative order

  OUTPUT:

        pkl (k+1, l+1, i+1, j+1) = i,jth control point
                                   of the surface differentiated k
                                   times in the u direction and l
                                   times in the v direction

 Adaptation of algorithm A3.7 from the NURBS book, pg114

    Copyright (C) 2009 Carlo de Falco

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 79

 SURFDERIVCPTS: Compute control points of n-th derivatives of a NURBS surface.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
surfderiveval


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 871

 SURFDERIVEVAL: Compute the derivatives of a B-spline surface.
 
 usage: skl = surfderiveval (n, p, U, m, q, V, P, u, v, d) 

  INPUT: 

        n+1, m+1 = number of control points
        p, q     = spline order
        U, V     = knots
        P        = control points
        u,v      = evaluation points
        d        = derivative order

  OUTPUT:

        skl (k+1, l+1) =  surface differentiated k
                          times in the u direction and l
                          times in the v direction

 Adaptation of algorithm A3.8 from the NURBS book, pg115

    Copyright (C) 2009 Carlo de Falco

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63

 SURFDERIVEVAL: Compute the derivatives of a B-spline surface.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
tbasisfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 926

 TBASISFUN: Compute a B- or T-Spline basis function, and its derivatives, from its local knot vector.

 usage:

 [N, Nder] = tbasisfun (u, p, U)
 [N, Nder] = tbasisfun ([u; v], [p q], {U, V})
 [N, Nder] = tbasisfun ([u; v; w], [p q r], {U, V, W})
 
 INPUT:

  u or [u; v] : points in parameter space where the basis function is to be
  evaluated 
  
  U or {U, V} : local knot vector

 p or [p q] : polynomial degree of the basis function

 OUTPUT:

  N    : basis function evaluated at the given parametric points 
  Nder : basis function gradient evaluated at the given parametric points 

    Copyright (C) 2009 Carlo de Falco
    Copyright (C) 2012 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.



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

 TBASISFUN: Compute a B- or T-Spline basis function, and its derivatives, fr...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
vecangle


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 920
 
 VECANGLE: An alternative to atan, returning an arctangent in the 
             range 0 to 2*pi.
 
 Calling Sequence:
 
   ang = vecmag2(num,dum)
 
 INPUT:
 
   num		: Numerator, vector of size (1,nv).
   dem		: Denominator, vector of size (1,nv).

 OUTPUT:
   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]);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
veccross


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1004
 
 VECCROSS: The cross product of two vectors.
 
 Calling Sequence:
 
   cross = veccross(vec1,vec2);
 
 INPUT:
 
   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.

 OUTPUT:
 
   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]);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
vecdot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 946
 
 VECDOT: The dot product of two vectors.
 
 Calling Sequence:
 
   dot = vecdot(vec1,vec2);
 
 INPUT:
 
   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.

 OUTPUT:

   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]);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
vecmag


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 807
 
 VECMAG: Magnitude of the vectors.
 
 Calling Sequence:
 
   mvec = vecmag(vec)
 
 INPUT:
 
   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.

 OUTPUT:

   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]);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
vecmag2


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 855
 
 VECMAG2: Squared magnitude of a set of vectors.
 
 Calling Sequence:
 
   mvec = vecmag2(vec)
 
 INPUT:
 
   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.

 OUTPUT:
 
   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]);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
vecnorm


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 850
 
 VECNORM: Normalise the vectors.
 
 Calling Sequence:
 
   nvec = vecnorn(vec);
 
 INPUT:
 
   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.

 OUTPUT:
 
   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]);

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
vecrot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 751
 
 VECROT: Transformation matrix for a rotation around the axis given by a vector. 
 
 Calling Sequence:
 
   rx = vecrot (angle, vector);
 
 INPUT:
 
   angle : rotation angle defined in radians
   vector: vector defining the rotation axis

 OUTPUT:
 
   rx: (4x4) Transformation matrix.
 
 
 Description:
 
   Return the (4x4) Transformation matrix for a rotation about the axis
   defined by vector, and by the given angle.
 
 See also:
 
    nrbtform

    Copyright (C) 2011 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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 
 VECROT: Transformation matrix for a rotation around the axis given by a ve...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
vecrotx


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1098
 
 VECROTX: Transformation matrix for a rotation around the x axis. 
 
 Calling Sequence:
 
   rx = vecrotx(angle);
 
 INPUT:
 
   angle		: rotation angle defined in radians

 OUTPUT:
 
   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 also:
 
    nrbtform

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
vecroty


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1138
 
 VECROTY: Transformation matrix for a rotation around the y axis. 
 
 Calling Sequence:
 
   ry = vecroty(angle);
 
 INPUT:
 
   angle		: rotation angle defined in radians
 
 OUTPUT:

   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 also:
 
    nrbtform

    Copyright (C) 2000 Mark Spink

    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.



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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
vecrotz


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1172
 
 VECROTZ: Transformation matrix for a rotation around the z axis. 
 
 Calling Sequence:
 
   rz = vecrotz(angle);
 
 INPUT:
 
   angle	: rotation angle defined in radians

 OUTPUT:
 
   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 also:
 
    nrbtform

    Copyright (C) 2000 Mark Spink

    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.



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1061

 VECSCALE: Transformation matrix for a scaling.
 
 Calling Sequence:
 
   ss = vecscale(svec)
 
 INPUT:
 
   svec    : A vectors defining the scaling along the x,y and z axes.
             i.e. [sx, sy, sy]

 OUTPUT:
 
   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 also:
 
    nrbtform

    Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton

    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.



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

 VECSCALE: Transformation matrix for a scaling.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
vectrans


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1066
 
 VECTRANS: Transformation matrix for a translation.
 
 Calling Sequence:
 
   st = vectrans(tvec)
 
 INPUT:
 
   tvec	: A vectors defining the translation along the x,y and
                   z axes. i.e. [tx, ty, ty]

 OUTPUT:
 
   st		: Translation Transformation Matrix
 
 Description:
 
   Returns a (4x4) Transformation matrix for translation.
 
   The matrix is:
 
         [ 1   0   0   tx ]
         [ 0   1   0   ty ]
         [ 0   0   1   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 also:
 
    nrbtform

    Copyright (C) 2000 Mark Spink

    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.



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





