PK_BSURF_piecewise_sf_t   


struct PK_BSURF_piecewise_sf_s
    {
    int                 u_degree;           --- The degree in u = order-1.
    int                 v_degree;           --- The degree in v = order-1.
    int                 n_u_segments;       --- The number of segments in u.
    int                 n_v_segments;       --- The number of segments in v.
    int                 dim;                --- Dimension of coefficient vecs
    PK_LOGICAL_t        is_rational;        --- True if the surface is rational
    PK_piecewise_rep_t  rep;                --- Representation method
    double             *coeffs;             --- Coefficient vectors
    };
typedef struct PK_BSURF_piecewise_sf_s PK_BSURF_piecewise_sf_t;


This data structure is the piecewise standard form of a b-surface.


Specific Errors:
    PK_ERROR_bad_value             unreadable value
    PK_ERROR_bad_dimension         illegal dim
    PK_ERROR_bad_order             hermite basis and degree not 3
    PK_ERROR_discontinuous_surface adjacent segments do not meet.


u_degree       This field specifies the degree of the surface in the u
                 direction. The minimum degree is 1.  If the Hermite basis is
                 used (rep = PK_piecewise_rep_hermite_c)
                 then the surface must be bicubic (degree = 3).

v_degree       This field specifies the degree of the surface in the v
                 direction. The minimum degree is 1.  If the Hermite basis is
                 used (rep = PK_piecewise_rep_hermite_c)
                 then the surface must be bicubic (degree = 3).

n_u_segments   The number of segments in the surface in the u direction.
                 This must be greater than or equal to 1. Adjacent segments
                 must meet.

n_v_segments   The number of segments in the surface in the v direction.
                 This must be greater than or equal to 1. Adjacent segments
                 must meet.

dim            This field gives the number of doubles per coefficient vector
                 in the array coeffs. Allowable values are 3 and 4.

is_rational    This field is set to true if the surface is rational.
                 In this case the dim field must be one greater than the
                 dimensionality of the surface.
                 At present, if:

                     is_rational == PK_LOGICAL_false then dim must be 3
                     is_rational == PK_LOGICAL_true  then dim must be 4.

rep            This field defines the representation method.
                 See documentation of PK_piecewise_rep_t.

'coeffs'         Contains
                 (u_degree+1)*n_u_segments*(v_degree+1)*n_v_segments
                 vectors of dimension dim.
                 If `is_rational` == PK_LOGICAL_false, then the vectors are
                 3-D vectors giving the x, y and z components.
                 If is_rational == PK_LOGICAL_true, then each vector has
                 a weight (w)associated with it, and x, y, z and w components
                 are supplied for each vector. The weights supplied must be
                 greater than zero.
                 The interpretation of coeffs depends on the representation
                 method chosen; this is determined by the value of the field
                 rep.


For more information about these representations see the chapter on "The
Mathematical Form of B_Geometry" in the Functional Description.