NURBS curves for shipbuilders.
Updated: Sep 14, 2021

Despite the fact that NURBS curves and surfaces have long been the standard tool for modeling curves and surfaces in shipbuilding, many engineers still have little idea of what they are dealing with. Let's try to look at this tool not from a mathematical, but from a practical engineering point of view. Let's try to understand:
- How is NURBS different from regular splines?
- Which NURBS is better?
- What to do with the scales?
- How to determine how much of the curve will change when you move the control polygon point?
- Why don't the points of the control polygon lie on the curve?
- How is a control polygon related to a curve?
Start over.
A NURBS curve is a set of segments of parametric polynomial curves joined together (where can we get away from math?). Each NURBS point can be calculated depending on the parameter U. I think that we will not figure out what is inside Fx, Fy, Fz. Let's take this as a black box.
X = Fx (U)
Y = Fy (U)
Z = Fz (U)
As you can see from these equations, the coordinates of a point on a NURBS curve do not depend on each other and depend only on the U parameter. That is, we can draw a curve of any shape, including those with loops. This is the advantage of NURBS over traditional mathematical splines. Another advantage is the convenience of visualizing such curves. When calculating points with equal step by parameter, the curve looks smooth and beautiful. The disadvantage is that if you need to calculate a point (or points) on a curve with a fixed coordinate, you need a numerical solution. This means that the point will be calculated with the specified precision. I put your attention to this, since the aspect of accuracy is important when transferring data from one program to another.

The shape of any NURBS curve is determined by the following parameters:
The degree and order of the curve.
NURBS consists of a set of polynomial segments of a given degree. The smoothness of joining the curve segments with each other, the NURBS change area when changing the position of one control point and the minimum number of possible points of the control polygon depend on the degree. The minimum possible number of control points is calculated as Degree + 1. This is called in various literature the order of the curve. You need to know this in order to meet fully armed with all kinds of CAD developers who intimidate unfortunate engineers with similar terms. Which degree is better? Probably more hight. The curve is smoother and more beautiful. Perhaps this is what we need? Below I have provided an example of NURBS degrees 1 to 5, presented on the same set of control points. See how the degree affects the shape of the curve.

First degree - the curve matches the control polygon. Not interested. It's easier to use a polygon.

Second degree - the curve already looks like a curve.Notice an interesting property - the curve touches each line of the control polygon. It is already possible to work with such a curve, but the spans of such a curve are joined only tangentially. The curvature of such a curve changes jumps from span to span. The lack of smoothness of such a curve will be visually noticeable.

Third degree - the curve is smoother. Continuity of tangents and curvatures is performed. This degree is most commonly used in design.

Fifth degree. Better and better. Higher order derivatives are smooth. The disadvantage of these curves is that the shape of the curve is quite different from the polygon. Another disadvantage is that when you change one control point, a significant part of the curve changes. So for those who love perfectionism in designing ships, I will say - do not be surprised if, when the line changes in the area of the bulb, half of the fore ship changes. This curve is much more difficult to control.
So common sense should be used when choosing a NURBS degree. As an additional argument, I will give an example of the sine or cosine function as infinitely smooth curves from the point of view of mathematics. However, no one uses them to design ships.
Control polygon.
Finally, we come to one of the most important properties of NURBS - the control polygon of the curve. As a matter of fact, this is what this class of curves and surfaces is called sculptural for. Unlike splines, where the curve passes through a set of points, the shape of NURBS curves is defined by the shape of the polygon, where the curve only passes through the start and end points of the polygon. In all other cases, the shape of the curve only repeats the shape of the polygon, but does not go through all its points. This was clearly seen in the example of changing the degree of the curve. The spline is simpler, you may say, the spline goes through all the given points. The spline is easier to manipulate. In fact, this does not play a significant role in the design, and the condition of the line passing through a given point is used very rarely. At the same time, NURBS has many more useful properties, and interactively changing the shape of a curve when changing points of a control polygon is no more difficult than changing the position of a spline point. So, the shape of the NURBS curve is determined by the shape of the control polygon. What you need to know when working with a control polygon:
- The curve starts and ends at the end points of the control polygon.
- The slope angles of the curve at the end points coincide with the slope angles of the polygon segments at the end points.

- The degree of fit of the curve at the end points depends on the length of the corresponding line segment. See picture below.

- For curves of the second degree, the curve touches each line segment

- in the case of curves of the third degree, the curve touches the polygon if three consecutive vertices lie on one straight line.In this case, the tangent point coincides with the midpoint.

- if for a curve of the third degree four points lie on one straight line, the portion of the curve will coincide with the middle segment of the polygon and will be a mathematically exact straight line. More points on one straight line - more straight line area of our curve.
