Surface definition

@SURFACE_DEFINITION {
@SURFACE_NAME {SurfaceName} {
@IS_DEFINED_IN_FRAME {FrameName} {
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {nu, nv}
@DEGREE_OF_CURVE {pu, pv}
@RATIONAL_CURVE_FLAG {RationalFlag}
@EDGE_CURVES {Curve0Name, Curve1Name, Curve2Name, Curve3Name}
@COORDINATES {x1, x2, x3, ww}
}
@KNOT_SEQUENCE_DEFINITION {
@KNOT_SEQUENCE {u1, u2, u3,... um}
@KNOT_SEQUENCE {v1, v2, v3,... vm}
}
}
}

Surface parameterization

1. Figure 1 shows a surface in space. The surface has an arbitrary shape in three-dimensional space. Surfaces can be defined with respect to a fixed frame, FrameName. Surface shapes are defined as tensor products of Non Uniform Rational B-Spline curves (NURBS).
2. Figure 1. Configuration of a surface.
3. The subsection @POINT_DEFINITION defines the shape of the surface. Control parameters must be specified first:
1. The number of control points, nu and nv, that define the overall shape of the surface. nu and nv define the number of control points for the curves parallel to the axes u and v, respectively, as depicted on fig. 1.
2. The degrees, pu and pv, of the polynomials representing the curves parallel to axes u and v, respectively. Note that nu > pu and nv > pv.
3. If RationalFlag == YES, the surface is a rational surface and weights must be defined for all control points. For a rational surface, the curves parallel to axes u and v must both be rational curves. If RationalFlag == NO, the surface is non rational and no weight are defined.
4. Next, (nu × nv) control points are defined. In general, a control point is defined by its @COORDINATES resolved in the fixed frame FrameName. The first nu control points corresponding to the curve at v = 0 are defined first. They correspond to the points labeled 1, 2, 3, and 4 on fig. 1. The next nu control points define the next curve parallel to the u axis. They correspond to the points labeled 5, 6, 7, and 8 on fig. 1. The last nu control points define the nv's curve, i.e., the last curve parallel to the u axis. They correspond to the points labeled 13, 14, 15, and 16 on fig. 1.
5. It is often convenient to define the bounding curves labeled Curve 0, Curve 1, Curve 2, and Curve 3 on fig. 1. The curves can be specified as Curve0Name, Curve1Name, Curve2Name, and Curve3Name, respectively. Note that the bounding curves must be specified in the order shown on the figure. The coordinates of the edge curves are not affected by the the fixed frame FrameName. Curves Curve0Name and Curve2Name must feature nu control points; curves Curve1Name and Curve3Name must feature nv control points.
6. The user can either define all four bounding curves, or none. If the four bounding curves are defined, the remaining points must be defined by their @COORDINATES. In the example depicted in fig. 1, the remaining point would be defined in the following order: points labeled 6, and 7; then points 10 and 11.
7. If the surface is a rational surface, weights must be defined for each control point. If a control point is defined by its @COORDINATES, the fourth entry is the weight. The edge curves must then also be rational curves. The length along the u and v curves is measured by curvilinear variable u and v, respectively, see fig. 1. u = 0.0 and u = 1.0 correspond to curves Curve1Name, and Curve3Name, respectively. v = 0.0 and v = 1.0 correspond to curves Curve2Name, and Curve0Name, respectively. Values 0.0 ≤ u ≤ 1.0 and 0.0 ≤ v ≤ 1.0 define a point on the surface.
4. The subsection @KNOT_SEQUENCE_DEFINITION defines the two knot sequences for the NURBS surface. A total of mu = nu + pu and mv = nv + pv knots must be defined for the curves parallel to axes u and v, respectively. The first pu + 1 entries must be ZERO, and the last pu + 1 entries must be ONE. The complete knot sequence must be a non decreasing series of numbers. Similar requirement hold for the mv entries of the second knot sequence. If no knot sequence is defined, a uniform knot sequence is automatically generated according to the declared degree of the corresponding curve.
5. It is possible to attach comments to the definition of the object; these comments have no effect on its definition.

Examples

Example 1.

The following example defines a planar rectangular surface. The corner points are pointA, pointB, pointC, and pointD. At first, the four bounding curves are defined.

@CURVE_DEFINITION {
@CURVE_NAME {curveCD} {
@IS_DEFINED_IN_FRAME {INERTIAL}
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {2}
@DEGREE_OF_CURVE {1}
@RATIONAL_CURVE_FLAG {NO}
@END_POINT_0 {pointC}
@END_POINT_1 {pointD}
}
@CURVE_NAME {curveBA} {
@IS_DEFINED_IN_FRAME {INERTIAL}
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {2}
@DEGREE_OF_CURVE {1}
@RATIONAL_CURVE_FLAG {NO}
@END_POINT_0 {pointB}
@END_POINT_1 {pointA}
}
@CURVE_NAME {curveCB} {
@IS_DEFINED_IN_FRAME {INERTIAL}
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {2}
@DEGREE_OF_CURVE {1}
@RATIONAL_CURVE_FLAG {NO}
@END_POINT_0 {pointC}
@END_POINT_1 {pointB}
}
@CURVE_NAME {curveDA} {
@IS_DEFINED_IN_FRAME {INERTIAL}
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {2}
@DEGREE_OF_CURVE {1}
@RATIONAL_CURVE_FLAG {NO}
@END_POINT_0 {pointD}
@END_POINT_1 {pointA}
}

Since the curves are straight lines, no internal point need to be defined, the curves are entirely defined by the end points. Next, the actual surface is defined.

@SURFACE_DEFINITION {
@SURFACE_NAME {surface} {
@IS_DEFINED_IN_FRAME {INERTIAL}
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {2, 2}
@DEGREE_OF_CURVE {1, 1}
@RATIONAL_CURVE_FLAG {NO}
@EDGE_CURVE_0 {curveBA}
@EDGE_CURVE_1 {curveCB}
@EDGE_CURVE_2 {curveCD}
@EDGE_CURVE_3 {curveDA}
}
}
}

Since the surface only has 2 control points for each of the curves, no internal points are defined for this simple rectangular surface.

Example 2.

The next example defines a non rational surface generated by two cubic curves as shown in fig. 2.

@SURFACE_NAME {example 2} {
@IS_DEFINED_IN_FRAME {INERTIAL}
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {4, 4}
@DEGREE_OF_CURVE {3, 3}
@RATIONAL_SURFACE_FLAG {NO}
@COORDINATES {0.0, 0.0, 0.0}
@COORDINATES {1.0, 0.0, 0.0}
@COORDINATES {2.0, 0.0, 0.0}
@COORDINATES {3.0, 0.0, 0.0}
@COORDINATES {0.0, 1.0, 0.0}
@COORDINATES {1.0, 1.0, 2.0}
@COORDINATES {2.0, 1.0, -3.0}
@COORDINATES {3.0, 1.0, 0.0}
@COORDINATES {0.0, 2.0, 0.0}
@COORDINATES {1.0, 2.0, -5.0}
@COORDINATES {2.0, 2.0, 8.0}
@COORDINATES {3.0, 2.0, 0.0}
@COORDINATES {0.0, 5.0, 0.0}
@COORDINATES {1.0, 5.0, 0.0}
@COORDINATES {2.0, 5.0, 0.0}
@COORDINATES {3.0, 5.0, 0.0}
}
}

Example 3.

The next example defines a cylinder of unit radius and unit height as shown in fig. 3; this is a rational surface.

@SURFACE_NAME {example 3} {
@IS_DEFINED_IN_FRAME {INERTIAL}
@POINT_DEFINITION {
@NUMBER_OF_CONTROL_POINTS {9, 2}
@DEGREE_OF_CURVE {2, 1}
@RATIONAL_SURFACE_FLAG {YES}
@COORDINATES { 1.00, 0.00, 0.0, 1.0000}
@COORDINATES { 1.00, 1.00, 0.0, 0.7071}
@COORDINATES { 0.00, 1.00, 0.0, 1.0000}
@COORDINATES {-1.00, 1.00, 0.0, 0.7071}
@COORDINATES {-1.00, 0.00, 0.0, 1.0000}
@COORDINATES {-1.00, -1.00, 0.0, 0.7071}
@COORDINATES { 0.00, -1.00, 0.0, 1.0000}
@COORDINATES { 1.00, -1.00, 0.0, 0.7071}
@COORDINATES { 1.00, 0.00, 0.0, 1.0000}
@COORDINATES { 1.00, 0.00, 1.0, 1.0000}
@COORDINATES { 1.00, 1.00, 1.0, 0.7071}
@COORDINATES { 0.00, 1.00, 1.0, 1.0000}
@COORDINATES {-1.00, 1.00, 1.0, 0.7071}
@COORDINATES {-1.00, 0.00, 1.0, 1.0000}
@COORDINATES {-1.00, -1.00, 1.0, 0.7071}
@COORDINATES { 0.00, -1.00, 1.0, 1.0000}
@COORDINATES { 1.00, -1.00, 1.0, 0.7071}
@COORDINATES { 1.00, 0.00, 1.0, 1.0000}
}
}

Example 4.

The next example defines the surface of a torus, a non rational surface, depicted in fig. 4. It can be obtained a the tensor product of a unit circle (a rational curve) representing the cross-section of the torus by another circle generating this surface of revolution.

Example 5.

The last example is the sphere of unit radius depicted in fig. 5. It can be obtained a the tensor product of a unit half-circle (a rational curve) by a full circle generating this surface of revolution.