CRBSPS ( dim, uorder, vorder, ncol, nrow, ctrl, uknots, vknots, nprops, props,
===============================================================================
bs, ifail )
===========
Create B-surface from B-spline data
Receives:
KI_int_dimension *dim --- dimension of control points
KI_int_order *uorder --- order of surface in u
KI_int_order *vorder --- order of surface in v
KI_int_nitems *ncol --- number of cols of control points
KI_int_nitems *nrow --- number of rows of control points
KI_dbl_coefficients ctrl[dim * ncol * nrow] --- control points
KI_dbl_knots uknots[] --- knot vector for the rows
KI_dbl_knots vknots[] --- knot vector for the columns
<KI_int_nitems> *nprops --- number of surface properties
KI_cod_papr props[nprops] --- array of surface properties
Returns:
KI_tag_b_surface *bs --- B-surface
KI_cod_error *ifail --- failure indicator
Specific errors:
KI_bad_knots Invalid knot vector
KI_weight_le_0 weights are non positive
KI_insufficient_points insufficient control points
KI_bad_parametric_prop property not applicable
Description:
This function creates a B-surface from B-spline data - i.e. a set
of B-spline vertices (control points), and knot vectors for both the u and v
directions. The surface may be either periodic or non-periodic, in either u
or v, and the 'props' array supplies this information.
Dimension of control points 'dim':
. For rational surfaces 'dim'=4.
. For non-rational surfaces 'dim'=3.
Order of the surface in u and v respectively, 'uorder' and 'vorder':
. The order is the degree + 1.
. The minimum order is 2.
Number of columns of control points 'ncol':
. For surfaces with non-periodic rows 'ncol' >= 'uorder'.
. For surfaces with periodic rows 'ncol' >= 3.
. The number of control points in each row is 'ncol'.
Number of rows of control points 'nrow':
. For surfaces with non-periodic columns 'nrow' >= 'vorder'.
. For surfaces with periodic columns 'nrow' >= 3.
. The number of control points in each column is 'nrow'.
Control points 'ctrl':
. The control points are supplied row by row, each row containing 'ncol'
vectors.
. For non-rational surfaces, the vectors are points in 3-space and
must be supplied [x0,y0,z0,x1,y1,z1,...]
. For rational surfaces each vector contains a point in 3-space followed by a
weight for the point. The points are supplied [x0,y0,z0,w0,x1,y1,z1,w1,...]
The weight must be positive. Increasing the weight of a control point will
pull the surface closer to that point.
Knot vector for the rows 'uknots':
. The knot values must form a non-decreasing sequence.
. For non-periodic rows there must be ('ncol' + 'uorder') knot values,
the maximum multiplicity of an internal knot value is ('uorder' - 1), and
the maximum multiplicity of an end knot value is 'uorder'.
. For periodic rows there must be ('ncol' + 1) knot values, and the
maximum multiplicity of any knot value is ('uorder' - 1). If the periodic
knot has multiplicity greater than 1, repetitions must be given at the end
of the knot vector.
Knot vector for the columns 'vknots':
. The knot values must form a non-decreasing sequence.
. For non-periodic columns there must be ('nrow' + 'vorder') knot values,
the maximum multiplicity of an internal knot value is ('vorder' - 1), and
the maximum multiplicity of an end knot value is 'vorder'.
. For periodic columns there must be ('nrow' + 1) knot values, and the
maximum multiplicity of any knot value is ('vorder' - 1). If the periodic
knot has multiplicity greater than 1, repetitions must be given at the end
of the knot vector.
Number of properties 'nprops':
. Gives the number of properties in the 'props' array.
. There are only two properties (periodicity of rows and columns) and so
'nprops' must be either 0, 1 or 2.
Properties array 'props':
. PAPRPU - the surface is periodic in u (i.e. the rows are periodic).
. PAPRPV - the surface is periodic in v (i.e. the columns are periodic).
In both cases, the default is non-periodic.