AMCAX Kernel 1.0.0.0
|
A B-spline is a piecewise polynomial curve widely used in computer graphics, geometric modeling, and numerical analysis. It is composed of control points, a knot vector, and basis functions. Its mathematical expression is:
Where Pi are the control points, which define the shape of the curve; Ni,p(u) are the B-spline basis functions, which combine the control points with weights to form the curve; p is the degree of the B-spline, and u is the parameter, whose range is determined by the knot vector.
A B-spline consists of control points, a knot vector, basis functions, degree, and weights.
Control points are the geometric definition points of the B-spline curve, determining its shape and direction.
The knot vector is a non-decreasing sequence of real numbers U = {u0, u1, ..., um}, which defines the piecewise intervals of the parameter space. The knot vector can be uniform (equal spacing between the knots) or non-uniform (the spacing between the knots can vary). Knot multiplicity is also involved, which refers to the number of times a specific knot value appears in the knot vector. For example, in the knot vector {0, 0, 0, 1, 2, 2, 3}, the multiplicity of knot 0 is 3, the multiplicity of knot 1 is 1, the multiplicity of knot 2 is 2, and the multiplicity of knot 3 is 1.
The B-spline basis function Ni,p(u) is calculated recursively:
The basis function determines the contribution of the control points to the shape of the curve.
The degree p is the polynomial degree of the B-spline. The higher the degree, the smoother the curve.
Standard B-spline do not have weights, and all control points have a default weight of 1. Rational B-spline (NURBS) introduce weights, allowing the representation of more complex geometries (such as conic curves). The weights can adjust the influence of control points on the shape of the curve.
B-spline can be classified based on different characteristics. Common classifications include uniform B-spline, non-uniform B-spline, periodic B-spline, non-periodic B-spline, and rational B-spline (NURBS). Below are their detailed descriptions:
Uniform B-spline have a knot vector that is evenly spaced along the parameter axis, i.e., ui+1 - ui = constant (>0). For example, the knot vector {0, 1, 2, 3, 4, 5, 6} has a uniform spacing of 1 between the knots.
Non-uniform B-spline have a knot vector that is non-uniformly distributed, i.e., the intervals between the knots may not be equal. The form of the knot vector can be any non-decreasing sequence, such as {0, 0.5, 1.2, 2.0, 3.5}.
Periodic B-spline have a periodic knot vector, meaning the curve is continuous at both ends of the parameter domain. They are typically used to represent closed curves.It should be noted that for periodic B-spline curves, the multiplicities of the first and last knots in the knot vector must be equal. Additionally, tthe number of control points equals the sum of the knot multiplicities minus the multiplicity of the last knot For periodic B-splines, the condition ( m = n + p + 1 ) does not need to be satisfied.
In the example above, the multiplicities of the first and last knots in the knot vector are both 1. The number of control points equals the sum of the knot multiplicities minus the multiplicity of the last knot, which is 5 in both cases.
Non-periodic B-spline have a non-periodic knot vector, meaning the curve typically coincides with the first and last control points at the ends of the parameter domain. They are typically used to represent open curves.
In the example above, the number of control points is 4, the degree of the curve is 3, the sum of the knot multiplicities is 8, and the total length of the knot vector satisfies ( m = n + p + 1 ).
Rational B-spline are an extension of B-spline, supporting more complex geometric shapes. NURBS introduce weights (positive numbers) to allow the representation of conic curves (e.g., circles, ellipses, parabolas), and the weights adjust the shape of the curve, making it more flexible.
For a rational B-spline, the weights must be greater than 0 and not all equal. If all weights are equal, the rational B-spline will degenerate into a non-rational B-spline.
To construct a valid B-spline, the following conditions must be met:
1.Control Points
2.Knot Vector
3.Knot Multiplicity
For non-periodic B-spline, the tangent at the endpoints of the curve is aligned with the direction of the control points. For periodic B-spline, the tangency at the endpoints is usually not directly related to the control points, because the curve is closed. Below is an example of a non-periodic B-spline:
Knot multiplicity directly affects the continuity of the curve. The higher the multiplicity of a knot, the lower the continuity at that point. If a knot has multiplicity 1, the curve is C(p-1) continuous at that knot. If the multiplicity is k, the curve is C(p-k) continuous at that knot. If the multiplicity is p+1, the curve is discontinuous at that knot.
For a 3rd-degree B-spline (p=3):
B-spline possess affine invariance, meaning that if affine transformations (such as translation, rotation, or scaling) are applied to the control points, the shape of the curve will change accordingly, but the parametric form of the curve remains unchanged. This implies that the relative structure and shape of the B-spline curve are always preserved, regardless of how affine transformations are applied to the control points.