Curve Data Type
 
 
 

Declaration:

curve <name> ( <component list> );

Reference:

<name>

Literal:

curve ( <component list> )

Purpose:

A curve is a non-uniform rational b-spline. It may be instanced as an object in the MODEL Section. A curve may be specified as a literal or as a variable. If specified as a variable, it must have a name. The following components must be specified between the parentheses:

All components are specified using a keyword=value form, and are separated by commas. The components may be specified in any order.

Example:

curve curve#2 (
 degree = 3,
 knots = (   0.0    ,  0.0    ,  0.0    ,  1.0    ,  1.0 ,
 1.0    ),
 cvs = (
 cv( ( -0.50656,  -0.43168,   0.0    ),   1.0    ),
 cv( ( -0.50998,  -0.5717 ,   0.0    ),   1.0    ),
 cv( ( -0.44153,  -0.62975,   0.0    ),   1.0    ),
 cv( ( -0.29094,  -0.62975,   0.0    ),   1.0    ) )
 );

cvs

Syntax:

cvs = ( ( <cv>, <cv>, … <cv> ),

( <cv>, <cv>, … <cv> ),

.

.

.

( <cv>, <cv>, … <cv> ) )

Range:

Any collection of valid cvs (see the CV Data Type).

Default:

None. Must be specified.

Purpose:

This defines the control vertices for the curve.

Example:

cvs = (
 cv( ( -0.50656,  -0.43168,   0.0    ),   1.0    ),
 cv( ( -0.50998,  -0.5717 ,   0.0    ),   1.0    ),
 cv( ( -0.44153,  -0.62975,   0.0    ),   1.0    ),
 cv( ( -0.29094,  -0.62975,   0.0    ),   1.0    ) )
);

degree

Syntax:

degree = <scalar>

Range:

1 to 33

Default:

none

Purpose:

To describe the degree of the NURBS curve. To define a syntactically correct curve, there must be at least degree + 1 control vertices.

Comments:

As the degree of the surface increases, it is a good idea to increase the rendering subdivisions for the object defined with that curve.

Example:

degree = 3

knots

Syntax:

knots = ( <scalar>, <scalar>, …<scalar> )

Range:

Each entry must evaluate to a real number, which must be greater than or equal to the value of its predecessor.

Default:

None. Must be specified.

Purpose:

This defines the knot vector in the curve’s direction. It must match with number of CVs given.

Comments:

It may be animated.

Example:

knots = ( 0, 1, 2, 3, 4, 5 )