PK_BCURVE_piecewise_sf_t   
struct PK_BCURVE_piecewise_sf_s
    {
    int                   degree;           --- The degree = order-1.
    int                   n_segments;       --- The number of curve segments
    int                   dim;              --- Dimension of coefficient vecs
    PK_LOGICAL_t          is_rational;      --- True if the curve is rational.
    PK_piecewise_rep_t    rep;              --- Representation method.
    double               *coeffs;           --- Coefficient vectors
    };
typedef struct PK_BCURVE_piecewise_sf_s PK_BCURVE_piecewise_sf_t;


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


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_curve   adjacent segments do not meet

Used in:

PK_BCURVE_ask_piecewise
PK_BCURVE_create_piecewise


'degree'         This field specifies the degree of the curve.  The minimum
                 degree is 1.  If the Hermite basis is used
                 ('rep' = PK_piecewise_rep_hermite_c)
                 then the curve must be cubic ('degree' = 3).

'n_segments'     The number of segments in the curve.  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 curve is rational.
                 In this case the 'dim' field must be one greater than the
                 dimensionality of the curve.
                 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 ('degree'+1)*'n_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'.
                 The vectors are ordered such that the coefficients for a given
                 segment are grouped together.

The 'rep' together with the 'coeffs' define a function for each segment of the
b-curve. For more information about these representations see
#Other methods of representing curves#DOC01561#. Note that the coefficients are
independent of the parameterisation of the b-curve - the function for each
segment of the b-curve is parameterised from 0 to 1.

Generated on: Fri, 04 Oct 2024 12:15:56 GMT