Vous êtes sur la page 1sur 25

Non-Uniform Rational B-spline

(NURBS)
DEFINITION & BASIC KNOWLEDGE
PART 1 OF 2

By Francisco Cisneros
From National Autonomous University of Mexico
June 2017
Before we start

This presentation is focused on representing in a didactic way the study of the basic concepts,
elements and graphic examples of the parametric curves
Presentation scope
Definition of parametric curves

Key Concepts for the Proper Study of Parametric Curves

Relationship between each of the key concepts and what is the importance of these

Continuity of curve and its types

Definition of Basis Functions

Definition of Knot sequence and Knot Multiplicity and their importance in parametric curves

Graphic examples of parametric curves


Summary table
Parametric
Curves Control Point
Key Knot
sequence How do they relate?
Concepts

Order
How do they relate?

Curves and surfaces


Continuity of Types of
a Curve continuity
Basis
Function
Common
Knot Knot
Knot
Sequence multiplicity
Sequences
Summary of
NURBS
Constructing
Bzier Curves
Illustrative References
video
Parametric Curves
Definition: NURBS is a mathematical model commonly used to represent curves and surfaces. When you are
already plotted, this method offers great flexibility and handling of them(Surfaces defined by common
mathematical formulae) and modeled shapes. NURBS curves are functions of one parameter mapping to a
curve in two-dimensional plane and the shape of the curve is determined by control points. NURBS surfaces
are functions of two parameters mapping to a surface in three-dimensional space and the shape of the
surface is determined by control points.
The NURBS (curve or surface ) are parametric equations that describe it depend on variables (or parameters)
that are not explicit part of the geometry.
A NURBS is described in terms of one parameter
By sweeping through different vales of (that is,
parameter space), it is possible to evaluate the
equations and determinate the , and values
for points on the curve in object on the curve in
object space.
Figure 1 represents this mapping of parameter
space to object space

= () Functions map this


= () single parameter
= () into space (Fig 1)
Fig 1.- Mapping a Parametric to Object Space
Key Concepts
Instead of explicitly explicitly specifying the mapping equations, we will use the following important key
concepts:
Control point .- They are points in object space that affect the shape the curve in some way. The
curve may pass near the control points (Figure 2) or pass through some of them. The control points
can be a set of data INPUT points through which you want a fit a curve, or a grid of points used to
describe a curved surface

Fig 2.- Using Control Points to shape the Curve

Knot sequence

Order
Key Concepts
Instead of explicitly explicitly specifying the mapping equations, we will use the following important key
concepts:
Control point

Knot sequence.- The knot sequence defines how the control points affect the curve. The knot
sequence is simply a list of nondecreasing numbers. These numbers determine if the curve passes
near the control points (an approximating curve)

Order
Key Concepts
Instead of explicitly explicitly specifying the mapping equations, we will use the following important key
concepts:
Control point

Knot sequence

Order.- determines the form of the parametric equations. The order is equal to one plus the
maximum exponent (degree) of the variables in the parametric equations. The order of a curve
affects how smooth the curve can be.

Basically,
= + 1
FOR EXAMPLE
The parametric equations of a cubic curve (degree = 3, order = 4) have the following form:
Similarly,
= 3 + 2 + + degree = 2, order = 3
Polynomials = 3 + 2 + + = 2 + +
= 3 + 2 + + = 2 + +
= 2 + +
Control point and Order
The number of control points must be equal to or greater than the order number of the curve. (So for a
curve of order 4, you must have at least four control points.)
The order of the curve also affects how the curve behaves when a control
point is moved.
To make curves with more than order control points, you can join two or more curves segments into
a piecewise curve (see Figure 3)

Fig 3.- Piecewise Cubic Curve


Continuity of a Curve
A breakpoint is where two curve segments meet within a piecewise curve. The continuity of a curve at a
breakpoint describes how those curves meet at the breakpoint. Figure 4 shows four possible types of
continuity:

Case 1

Case 2

Case 3

Case 4

Fig 4.- Continuity of a Curve


Types of continuity
Case Type Description Figure

11 No
Nocontinuity
continuity The
The curves
curves do
do not
not meet
meet at
at all.
all

The endpoints of the two curves meet (the


The endpoints
curves of the twocontinuity
have positional curves meet (the
only).
2 00continuity curves
2 continuity Therehave
may positional
be a sharpcontinuity only).
point where There
they
may be a sharp meet.
point where they meet.

The
Thecurves
curveshave
haveidentical
identicaltangents
tangentsat at the
the
1
continuity breakpoint. (The
breakpoint. tangent
(The is the
tangent slope
is the at at
slope the
33 1 continuity
breakpoint.)
the The
breakpoint.) curves
The join
curves smoothly.
join smoothly.
C1
C1curves
curvesalso
alsohave
havepositional
positional continuity.
continuity.

TheThe curves
curves have
have identical
identical curvature
curvature at at
the
the breakpoint. (Curvature is defined
breakpoint. (Curvature is defined as the as
44 22continuity
continuity ratethe rate of change
of change of the tangents.)
of the tangents.) Curvature
Curvature
continuity continuity
implies implies both
both tangential and
tangential and positional continuity.
positional continuity.

Table 1.- Continuity of a curve


Continuity and Order
The order of a curve determines the maximum continuity possible. Thus, you may need a higher order
curve if you need more continuity.

FOR EXAMPLE:

The maximum continuity is 2. For example, for cubic curves, the maximum continuity possible is
2 (curvature continuity). As seen in the Figure 5.

Fig 5.- Continuity of a Curve


Cubic curves
Basis Function
Each control point is like a magnet tugging on the curve (see Figure 6). The strength and extent of these
magnets is described mathematically by a particular basis function. For a NURBS, this function is the B-
spline basis function.

Fig 6.- Control Points Influence the Curve


B-spline basis function
Basis Function
The B-spline basis function (Figure 7) describes the curve in parameter space.

Fig 7.- B-Spline Basis Function

The resulting curve is equal to the sum of the contributions from each control point. Note that a control
point (a magnet) affects the entire curve, although its influence becomes weaker as you move away
from it. The exact extent of the influence is determined by the knot sequence.
Knot Sequence
The distribution of basis functions in parameter space is controlled by the knot sequence (also referred to as
the knot vector, or the knots). The knot sequence is a list of nondecreasing values. Each knot defines the
beginning and end of a basis function.
There must be exactly ( + ) values in the knot sequence.

The curve is defined only where basis functions overlap (as shown in Figure 8). If the knot values are
singular (no repeating values) and regularly spaced, the curve is a uniform B-spline.

FOR EXAMPLE:

0 1 2 3 4 5 6 7
Fig 8.- Basis Functions
A Uniform Knot Sequence
Knot Sequence

0 1 2 3 4 5 6 7
Fig 8.- Basis Functions
A Uniform knot Sequence

Fig 9.- Example of piecewise curve

This Figure 9 also illustrates another important NURBS relationship: at any point where the curve is defined,
the sum of all basis functions is equal to unity.
Knot Multiplicity
Distinct knot values define segments. A basis function always
spans in segments. Duplicating values in the knot
sequence increases that value's multiplicity and causes more
than one basis function to start at that point. This also causes a
corresponding decrease in the continuity of the curve.
Figure 10 and Figure 11 uses the same two sets of control
points, with different knot sequences for the top and bottom
curves. Notice how the bottom curve has 0 continuity, and Fig 10.- Curve with 2 continuity
the top curve has 2 continuity. This relationship between
multiplicity and the continuity of the curve can be expressed
mathematically as follows:
= ( + 1)
Where equals the order of the curve and is the
multiplicity.

Whats Multiplicity? If a knot appears times


(i.e. = +1 = = +1 ), where > 1, is a
multiple knot of multiplicity , and it is written as:

()

Fig 11.- Curve with 0 continuity


Knot Multiplicity
Knot Multiplicity
Knot Multiplicity
The maximum multiplicity (maximum times you can repeat a
knot) is . Table.- shows knot multiplicity and the resulting
continuity.

Continuity
Knot Multiplicity* Continuity
Conditions
Positional
1 tangential 2 Fig 10.- Curve with 2 continuity
curvature

Positional
2 1
tangential

3 0
Positional

4 none none

Table 2.- Continuity and Knot Multiplicity for Cubic Curves

*Times in which a basis function crosses a knot Fig 11.- Curve with 0 continuity
Common Knot Sequences
Several common knot sequences are extremely useful for a wide variety of applications:

Continuity
Knot Multiplicity Continuity Plot
Conditions

knots are uniformly spaced; for example,


Uniform cubic B-spline
single multiplicity 0, 1, 2, 3, 4, 5, 6, 7

multiplicity = 4 at beginning
and end for example,
Cubic Bezier curve
0, 0, 0, 0, 1, 1, 1, 1

Uniform cubic B-spline that multiplicity= 4 at beginning for example,


passes through endpoints and end; uniformly spaced 0, 0, 0, 0, 1, 2, 3, 4, 5, 5, 5, 5
single knots between

Table 3.- Continuity and Knot Multiplicity for Cubic Curves


Summary of NURBS Relationsihps
The previous slideshow have outlined important relationships between NURBS parameters. They can be
summarized as follows:

= + 1 ,
where
is the maximum exponent in the parametric equations
To define a curve, you need at least control points
= 2
= + . .
Knot values must be nondecreasing
=
= ( + 1)

Thus, for cubic curves, the order equals 4. You need at least four control points to define a cubic curve. The
maximum continuity for cubic is C2 continuity. You need a minimum of eight knots in the knot sequence. The
maximum knot multiplicity of cubic is 4.
Constructing Bzier Curves

Linear curves Quadratic curves

Quadratic curves

Fifth-order curves
Cubic curves
Illustrative video
References
Article title: Chapter 8. Curves and Surfaces
Website title: Menehune.opt.wfu.edu
URL: http://menehune.opt.wfu.edu/Kokua/Irix_6.5.21_doc_cd/usr/share/Insight/library/SGI_bookshelves/SGI_Developer/books/Inv_Mentor/sgi_html/ch08.html

Article title: Bzier curve


Website title: En.Wikipedia.org
URL: https://en.wikipedia.org/wiki/B%C3%A9zier_curve

Vous aimerez peut-être aussi