Surface definition
- @SURFACE_DEFINITION {
- @SURFACE_NAME {SurfaceName} {
- @IS_DEFINED_IN_FRAME {FrameName} {
- @POINT_DEFINITION {
- @NUMBER_OF_CONTROL_POINTS {n_{u}, n_{v}}
- @DEGREE_OF_CURVE {p_{u}, p_{v}}
- @RATIONAL_CURVE_FLAG {RationalFlag}
- @EDGE_CURVES {Curve0Name, Curve1Name, Curve2Name, Curve3Name}
- @COORDINATES {x_{1}, x_{2}, x_{3}, ww}
- }
- @KNOT_SEQUENCE_DEFINITION {
- @KNOT_SEQUENCE {u_{1}, u_{2}, u_{3},... u_{m}}
- @KNOT_SEQUENCE {v_{1}, v_{2}, v_{3},... v_{m}}
- }
- @COMMENTS {CommentText}
- }
- }
Surface parameterization
- 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).
- The subsection @POINT_DEFINITION defines the shape of the surface. Control parameters must be specified first:
- The number of control points, n_{u} and n_{v}, that define the overall shape of the surface. n_{u} and n_{v} define the number of control points for the curves parallel to the axes u and v, respectively, as depicted on fig. 1.
- The degrees, p_{u} and p_{v}, of the polynomials representing the curves parallel to axes u and v, respectively. Note that n_{u} > p_{u} and n_{v} > p_{v}.
- 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.
- Next, (n_{u} × n_{v}) control points are defined. In general, a control point is defined by its @COORDINATES resolved in the fixed frame FrameName. The first n_{u} 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 n_{u} 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 n_{u} control points define the n_{v}'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.
- 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.
- 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.
- 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.
- The subsection @KNOT_SEQUENCE_DEFINITION defines the two knot sequences for the NURBS surface. A total of m_{u} = n_{u} + p_{u} and m_{v} = n_{v} + p_{v} knots must be defined for the curves parallel to axes u and v, respectively. The first p_{u} + 1 entries must be ZERO, and the last p_{u} + 1 entries must be ONE. The complete knot sequence must be a non decreasing series of numbers. Similar requirement hold for the m_{v} 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.
- It is possible to attach comments to the definition of the object; these comments have no effect on its definition.
Figure 1. Configuration of a surface.
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}
- }
- }
Figure 2. Bi-cubic surface.
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}
- }
- }
Figure 3. Cylinder of unit radius and unit height. The symbol (*) denotes the control points.
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.
Figure 4. The torus as a surface of revolution. The symbol (*) denotes the control points.
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.