NURBS Curve Detailed

Source: Internet
Author: User
NURBs Curve Detailed excerpt from: http://www.win-cnc.com/htmlmodel/jswzxx/243580.html

NURBS (Non Uniform rational b-spline) curves are often referred to as non-uniform rational B-spline curves, which are mathematically defined as follows:


A base function is defined by a recursive formula:


Non-uniform: the value and spacing of a node vector can be any value. In this way, we can get different shape of the mixed function in different intervals, which provides more freedom to control the shape of the curve freely. The main difference between uniform and non-uniformity is the value of the node vector. If the node vector is set appropriately, an open uniform spline can be generated, which is a uniform and non-uniform cross-section. Open spline at both ends of the node value will repeat D times, its node spacing is uniform. For example:
{0,0,1,2,3,3}, (d=2,n=3)
{0,0,0,1,2,2,2}, (d=4,n=4)
The Open homogeneous B-spline is very similar to the Boesel spline, and if the d=n+1 (that is, the polynomial number is n), then the open B-spline becomes the Boesel spline, with all nodes having a value of 0 or 1. such as three open B-splines for four control points, the node vector is: {0,0,0,0,1,1,1}.
Rational B-spline: The rational function is the ratio of two polynomial, the rational spline (rationalspline) is the ratio of two spline functions, and the rational B-spline is described by a vector.
The Urbs curve is defined by the following three parameters:
(1) Control points: Determine the position of the curve, usually not on the curve, forming a control polygon. (see Figure 1, figure)


Fig. 1 Effect of Control point movement on curves

(2) Weight factor: Determine the weight of the control point, which corresponds to the "Gravity" of the control point, the greater the value of the curve is closer to the control point (see Figure 2,bi as the control point).


Fig. 2 Variation of the curve with weight factor

(3) The node vector k:nurbs curve changes with the parameter K, the parametric point K corresponding to the control vertex is called the node, and the node's set ki:[k0,k1...,kn...,kn+m+1] is called the node vector.
Node: There is more than one control point at any point on the curve (except for the end of the Bezier), the node is like a boundary where one control point loses its effect and the other control point has an effect.

2, how NURBS curve through the first stub point
A multiple-node sequence makes the spline closer to the repeating node position. If the end node repeats d+1 times, the D-order B-spline must interpolate the last control point. Therefore, one way to solve a spline that cannot span the entire control vertex sequence is to repeat the first two nodes, so that the resulting spline will interpolate two control points.

For non-periodic splines, the node vectors are


That is, each end of the node vector has m+1 the same node, so that the curve through the control of the first and end points, and tangent to the first and last sides.

(Refer to System programming Chapter §2.7 Program example)

3. Matrix calculation method and matrix representation of NURBS curve trajectory
Because the node parameters of NURBs spline function are not equidistant along the parameter axis, the B-spline basis functions formed by different node vectors are not equal, they need to be calculated separately, and the weighted factors are added in the algorithm, so the calculation of curve locus points is more complicated and time-consuming, in order to improve the real-timely of nurbs curve interpolation. In order to simplify the calculation of real-time interpolation, the main task is to determine the relative coefficients of the NURBS curve trajectory calculation formula before the real-time interpolation is needed.
If the curve is expressed in three nurbs form (three times the same as the K-time method and the expression is different), i.e. K=3, then the segment I curve can be written as the following matrix form:

Finishing can be done by:

Because the control point di and the weight factor Wi are known, and MI is only related to the node vector, is also determined, CI and mi, Wi, Di, which is also determined, so the coefficients are known in the formula, and the parameters of the interpolation points are not independent, can be found before interpolation, the value of I in the formula is 3 to N, So for the whole nurbs curve, the coefficients that can be calculated are all n-2 groups, and the corresponding coefficients are dynamically selected in interpolation according to the position of interpolation points.


For the coordinates x, Y, z on the curve are:

Http://www.win-cnc.com/htmlmodel/jswzxx/243580.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.