Bézier triangle definition
- @BEZIER_TRIANGLE_DEFINITION {
- @BEZIER_TRIANGLE_NAME {BzTrigName} {
- @IS_DEFINED_IN_FRAME {FrameName} {
- @POINT_DEFINITION {
- @NUMBER_OF_CONTROL_POINTS {n_{u}}
- @DEGREE_OF_CURVE {p_{u}}
- @RATIONAL_CURVE_FLAG {RationalFlag}
- @EDGE_CURVES {Curve0Name, Curve1Name, Curve2Name}
- @COORDINATES {x_{1}, x_{2}, x_{3}, ww}
- }
- @COMMENTS {CommentText}
- }
- }
Surface parameterization
- Figure 1 shows a Bézier triangle in space. The surface has an arbitrary shape in three-dimensional space. Surfaces can be defined with respect to a fixed frame, FrameName.
- The subsection @POINT_DEFINITION defines the shape of the Bézier triangle. Control parameters must be specified first:
- The number of control points, n_{u}, that define the overall shape of the Bézier triangle. n_{u} defines the number of control points for each of the curves depicted on fig. 1.
- The degree, p_{u}, of the polynomials representing the curves. Note that n_{u} > p_{u}.
- If RationalFlag == YES, the surface is a rational surface and weights must be defined for all control points. For a rational surface, the curves must be rational curves. If RationalFlag == NO, the surface is non rational and no weight are defined.
- Next, n_{u} (n_{u} + 1) / 2 control points are defined. In general, a control point is defined by its @COORDINATES resolved in the fixed frame FrameName. The points are numbered in the order indicated in fig. 1.
- It is often convenient to define the bounding curves labeled Curve 0, Curve 1, and Curve 2 in fig. 1. The curves can be specified as Curve0Name, Curve1Name, and Curve2Name, 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, Curve1Name and Curve2Name must each feature nu control points.
- The user can either define all three bounding curves, or none. If the three 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 point labeled 6.
- 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.
- 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 Bézier triangle. The corner points are pointA, pointB, and pointC. At first, the three bounding curves are defined.
- @CURVE_DEFINITION {
- @CURVE_NAME {curveAB} {
- @IS_DEFINED_IN_FRAME {INERTIAL}
- @POINT_DEFINITION {
- @NUMBER_OF_CONTROL_POINTS {2}
- @DEGREE_OF_CURVE {1}
- @RATIONAL_CURVE_FLAG {NO}
- @END_POINT_0 {pointA}
- @END_POINT_1 {pointB}
- }
- @CURVE_NAME {curveBC} {
- @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 {pointC}
- }
- @CURVE_NAME {curveAC} {
- @IS_DEFINED_IN_FRAME {INERTIAL}
- @POINT_DEFINITION {
- @NUMBER_OF_CONTROL_POINTS {2}
- @DEGREE_OF_CURVE {1}
- @RATIONAL_CURVE_FLAG {NO}
- @END_POINT_0 {pointA}
- @END_POINT_1 {pointC}
- }
Since the curves are straight lines, no internal point need to be defined, the curves are entirely defined by the end points. Next, the Bézier triangle is defined.
- @BEZIER_TRIANGLE_DEFINITION {
- @BEZIER_TRIANGLE_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 {curveAB}
- @EDGE_CURVE_1 {curveBC}
- @EDGE_CURVE_2 {curveAC}
- }
- }
- }
Since the Bézier triangle only has 2 control points for each of the curves, no internal points are defined for this simple Bézier triangle.