An introduction to NURBS

Similar documents
Rational Bezier Surface

Curves and Surfaces 1

CAP 6736 Geometric Modeling Team Hamilton B-Spline Basis Functions. Presented by Padmavathi Siddi Vigneshkumar Suresh Jorge Medrano

Geometric Modeling of Curves

Need for Parametric Equations

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

Approximation of 3D-Parametric Functions by Bicubic B-spline Functions

Rational Bezier Curves

Curves and Surfaces Computer Graphics I Lecture 9

LECTURE #6. Geometric Modelling for Engineering Applications. Geometric modeling for engineering applications

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Curve and Surface Basics

Computer Graphics. Curves and Surfaces. Hermite/Bezier Curves, (B-)Splines, and NURBS. By Ulf Assarsson

3D Modeling Parametric Curves & Surfaces

Les Piegl Wayne Tiller. The NURBS Book. Second Edition with 334 Figures in 578 Parts. A) Springer

Until now we have worked with flat entities such as lines and flat polygons. Fit well with graphics hardware Mathematically simple

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Bezier Curves, B-Splines, NURBS

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

3D Modeling Parametric Curves & Surfaces. Shandong University Spring 2013

08 - Designing Approximating Curves

GL9: Engineering Communications. GL9: CAD techniques. Curves Surfaces Solids Techniques

Curves and Surfaces Computer Graphics I Lecture 10

A story about Non Uniform Rational B-Splines. E. Shcherbakov

CAGD PACKAGE FOR MATHEMATICA AND ITS USAGE IN THE TEACHING

NURBS: Non-Uniform Rational B-Splines AUI Course Denbigh Starkey

Developing an Approach to Redesign Freeform Surfaces Using B-Spline Technique

Curves and Surfaces for Computer-Aided Geometric Design

A generalized conversion matrix between non-uniform B-spline and Bézier representations with applications in CAGD

Positivity Preserving Interpolation of Positive Data by Rational Quadratic Trigonometric Spline

Parametric curves. Brian Curless CSE 457 Spring 2016

The Free-form Surface Modelling System

Knot Insertion and Reparametrization of Interval B-spline Curves

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

Computational Physics PHYS 420

Intro to Curves Week 1, Lecture 2

2Surfaces. Design with Bézier Surfaces

Introduction to the Mathematical Concepts of CATIA V5

2D Spline Curves. CS 4620 Lecture 13

CS 536 Computer Graphics Intro to Curves Week 1, Lecture 2

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Curve Representation ME761A Instructor in Charge Prof. J. Ramkumar Department of Mechanical Engineering, IIT Kanpur

Computergrafik. Matthias Zwicker. Herbst 2010

Intro to Modeling Modeling in 3D

2D Spline Curves. CS 4620 Lecture 18

Lecture 9: Introduction to Spline Curves

Design considerations

Shape Representation Basic problem We make pictures of things How do we describe those things? Many of those things are shapes Other things include

Quasi-Quartic Trigonometric Bézier Curves and Surfaces with Shape Parameters

Advanced Modeling 2. Katja Bühler, Andrej Varchola, Eduard Gröller. March 24, x(t) z(t)

B-Splines and NURBS Week 5, Lecture 9

Lesson 2.4 Exercises, pages

Bézier Splines. B-Splines. B-Splines. CS 475 / CS 675 Computer Graphics. Lecture 14 : Modelling Curves 3 B-Splines. n i t i 1 t n i. J n,i.

Fathi El-Yafi Project and Software Development Manager Engineering Simulation

Parametric Surfaces and Surface Area

ENGI Parametric & Polar Curves Page 2-01

CHAIKIN S ALGORITHMS FOR CURVES

Free-form curve design by knot alteration

American International Journal of Research in Science, Technology, Engineering & Mathematics

WING SHAPE OPTIMIZATION USING A CONSTRAINED NURBS SURFACE GEOMETRICAL REPRESENTATION

An introduction to interpolation and splines

Curves. Computer Graphics CSE 167 Lecture 11

Constrained modification of the cubic trigonometric Bézier curve with two shape parameters

Reading. Parametric surfaces. Surfaces of revolution. Mathematical surface representations. Required:

COMP3421. Global Lighting Part 2: Radiosity

CS 475 / CS Computer Graphics. Modelling Curves 3 - B-Splines

Reparametrization of Interval Curves on Rectangular Domain

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006

End-Term Examination

Know it. Control points. B Spline surfaces. Implicit surfaces

Intro to Curves Week 4, Lecture 7

CS-184: Computer Graphics

Free-Form Deformation (FFD)

PS Geometric Modeling Homework Assignment Sheet I (Due 20-Oct-2017)

CS-184: Computer Graphics. Today

B-spline Curves. Smoother than other curve forms

Dgp _ lecture 2. Curves

Advanced Graphics. Beziers, B-splines, and NURBS. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Figure 5.1: Spline and ducks.

Almost Curvature Continuous Fitting of B-Spline Surfaces

Curves and Surfaces. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd

Information Coding / Computer Graphics, ISY, LiTH. Splines

Curves and Surfaces 2

Spline curves. in polar and Cartesian coordinates. Giulio Casciola and Serena Morigi. Department of Mathematics, University of Bologna, Italy

Curves and Surface I. Angel Ch.10

Towards Automatic Recognition of Fonts using Genetic Approach

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

CSE 167: Introduction to Computer Graphics Lecture #11: Bezier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Mathematical Tools in Computer Graphics with C# Implementations Table of Contents

Cutting Force Simulation of Machining with Nose Radius Tools

10.4 Areas in Polar Coordinates

Second Triangular Hermite Spline Curves and Its Application

Bézier and B-spline volumes Project of Dissertation

8 Project # 2: Bézier curves

If You Know B Splines Well, You Also Know NURBS!

Introduction p. 1 What Is Geometric Modeling? p. 1 Computer-aided geometric design Solid modeling Algebraic geometry Computational geometry

Drawing hypergraphs using NURBS curves

An Introduction to B-Spline Curves

(Spline, Bezier, B-Spline)

Praxis Elementary Education: Mathematics Subtest (5003) Curriculum Crosswalk. Required Course Numbers. Test Content Categories.

Transcription:

An introduction to NURBS Philippe Lavoie January 20, 1999 A three dimensional (3D) object is composed of curves and surfaces. One must find a way to represent these to be able to model accurately an object. The two most common methods to represent a curve or a surface are the implicit and the parametric method. The implicit method is a function which depends on the axis variables and is usually equal to 0. It describes a relationship between the axis variables. For example, the function f(x, y) = x 2 + y 2 1 = 0 represents a circle of radius 1. In the parametric method each of the axis variables is a function of an independent parameter. In this form, a curve would be defined with the independent variable u as [x(u), y(u)] a u b To represent the first quadrant of a circle in a parametric form, one can write [cos(u), sin(u)] 0 u π 2 or he can also write [ ] 1 t 2 1 + t 2, 2t 1 + t 2 0 t 1 This shows that the parametric representation of a curve is not unique. To visualize how a parametric curve is drawn, imagine that as time increases a new point on the curve is plotted. In the function above, the time is represented with the variable t, it goes from 0 to 1 and it generates a curve like the one in figure 1. A class of parametric curves and surface is the Non-Uniform Rational B-Spline (NURBS) curve or surface. NURBS are being used for computational reasons such as being easily processed by a computer, being stable to floating points errors and having little memory requirements and for the ability to represent any kind of curves or surface. They are the generalization of non-rational B-splines which are based on rational Bézier curves. Finally, the rational Bézier curve is a generalization of the Bézier curve which is studied first. A Bézier curve of degree n is defined by B i,n (u)p i 0 u 1 (1) 1

Y t = 1 t = 0 X Figure 1: A quadrant of a circle generated with [ ] 1 t 2 2t 1+t, 2 1+t for 0 t 1 2 The geometric coefficients P i are called control points. The basis functions B i,n are the classical nth-degree Bernstein polynomials [1] given by B i,n (u) = n! i!(n i)! ui (1 u) n i (2) For interactive shape design, the control points of the Bézier curve convey a lot of geometric information as it can be seen with figure 2. Figure 2: A Bézier curve of degree 3. The Bézier curves can not represent conic curves. A conic curve (such as a circle) can be represented using a rational function which is defined as the ratio of two polynomials such as x(u) = X(u) W (u) y(u) = Y (u) W (u) z(u) = Z(u) W (u) (3) From this observation, the rational Bézier curve is defined as n B i,n(u)w i P i n B 0 u 1 (4) i,n(u)w i 2

The P i and B i,n are defined as before, the w i are scalars called the weights. When the weights are varied, a control point will attract or repulse the curve more. This is best explained with an example. Four Bézier curves are drawn in figure 3. The only difference between them, is the weight of the control point P 2. The weight of 0.5 makes the curve go outside the boundary drawn by its control points. With the weight equal to 1, the curve is equivalent to the one depicted in figure 2. The weight of 2 tends to push the curve away from the second point and the weight of 10 pushes it even farther. Figure 3: The effects of changing the weight of the second control point with w = 0.5, 1, 2 and 10. A curve consisting of only one rational Bézier curve segment is often inadequate. The problems with a single segment range from the need of a high degree curve to accurately fit a complex shape, which is inefficient to process and is numerically unstable, to the need of interactive design for which a single segment has limitations as far as local control of the shape is concerned. To overcome these problems, a piecewise rational curve is used. A piecewise Bézier curve or a B-spline curve is constructed from several Bézier curves joined together at some breakpoints with some level of continuity between them. Such a curve is depicted in figure 4. u 2 u 1 C 2 (u) C 3 (u) u 3 C 1 (u) C 4 (u) u 0 u 4 Figure 4: A piecewise rational Bézier curve. The curve C(u) is defined on u [0, 1] and it is composed of the segments C i (u), 1 i m. The segments are joined together at the breakpoints u 0 = 0 < u 1 < u 2 < u 3 < u 4 = 1 with some level of continuity. The curve is said to be C k continuous at a breakpoint u i if C (j) i (u i ) = C (j) i+1 (u i) for all 0 j k where C (j) i represents the jth derivative of C i. 3

C 2 (u) C 3 (u) C 1 (u) C 4 (u) Figure 5: The Bézier segments composing the curve. The different control points composing the B-spline curve are shown in figure 5. The control points circled with another circle are control points which are used by more than one Bézier segment. It should be clear that storing these points more than once is not memory efficient. If the curve is said to be C 1 continuous, then some of the points inside a Bézier segment are dependent on the position of the previous points to satisfy the continuity constraint. Therefore storing these points in memory is not necessary. The equation of the B-spline should therefore be memory efficient and should also allows for the local control of the curve; i.e. the basis functions should not be defined over [u 0, u m ], instead, they should be constrained to a limited number of subintervals. It is defined as N i,p P i a u b (5) where P i are the control points and N i,p are the pth degree B-spline basis functions. There are different methods to define the B-spline basis functions: divided differences of truncated power functions [3], blossoming [6] and recurrence formula [2, 4, 5]. The recurrence definition is used since it is well suited to a computer implementation. The B-spline has breakpoints which are named knots as seen in figure 4. A sequence of these knots is named the knot vector and it is defined as U = u 0,..., u m which is a nondecreasing sequences of real numbers, i.e., u i u i+1 for i = 0,..., m. The B-spline basis function of p-degree is defined using the recurrence formula as N i,0 (u) = N i,p (u) = { 1 if ui u < u i+1 0 otherwise u u i N i,p 1 (u) + u i+ u N i+1,p 1 (u) u i+p u i u i+ u i+1 (6) The above equation can result in a 0 / 0 quotient; that quotient is defined to be zero. The knot vector of a B-spline curve is a non-periodic and non-uniform knot vector of the form U = {a,..., a, u }{{},..., u m, b,..., b} (7) }{{} The B-spline curve of figure 4 is presented with its control polygon in figure 6. The control polygon is the polygon formed by joining the control points P i. 4

Figure 6: A B-spline curve with its control polygon. As mentioned above, only rational functions can represent a conic curves therefore one could generalize the B-spline curve to obtain a rational representation. This generalization is named Non Uniform Rational B-Spline (NURBS) and it is defined as n N i,p(u)w i P i n N a u b (8) i,p(u)w i where P i are the control points, w i are the weights and N i,p are the B-spline basis functions defined on the non-periodic and non-uniform knot vector defined in equation 7. Rational curves with coordinate functions in the form expressed in equation 3 have efficient processing and have an elegant geometric interpretation. The use of homogeneous coordinates can represent a rational curve in n dimensions as a polynomial curve of n + 1 dimensions. The homogeneous control points are written as Pi w = w i x i, w i y i, w i z i, w i in a four dimensional space where w 0. To obtain P i, we divide all the coordinates by the fourth coordinate w i. This operation corresponds to a perspective map with the center at the origin. With these coordinates, the NURBS curve can be redefined as C w (u) = N i,p (u)pi w (9) NURBS are also used to represent surfaces. A NURBS surface in homogeneous coordinates is defined as S w (u, v) = j=0 m N i,p (u)n j,q (v)pi,j w (10) where P w i,j forms a bidirectional control net, and N i,p(u) and N j,q (v) are the nonrational B-spline basis functions defined on the knot vectors U = {a,..., a, u }{{},..., u r, b,..., b} }{{} V = {c,..., c, u }{{} q+1,..., u s q+1, d,..., d} }{{} q+1 q+1 where r = n + p + 1, s = m + q + 1 and the limits [a, b] and [c, d] are usually always set to [0, 1]. 5

References [1] S.N. Bernstein. Démonstration du théorème de Weierstrass fondée sûr le calcul dès probabilités. Commun. Soc. Math. Khrakow, Vol. 12(No. 2):pages 1 2, 1912. [2] M. G. Cox. The numerical evaluation of b-slines. Jour. Inst. Math. Applic., Vol. 10:pages 134 149, 1972. [3] H. B. Curry and I.J. Schoenberg. On spline distributions and their limits: the pòlya distribution functions. Bull. Amer. Math. Soc., Vol. 53:page 109, 1947. Abstract 380t. [4] C. De Boor. On calculating with b-splines. Jour. Approx Theory, Vol. 6:pages 50 62, 1972. [5] C. De Boor. A Practical Guide to Splines. Springer-Verlag, New York, 1978. [6] L. Ramshaw. Blossoming: A connect-the-dots approach to splines. Technical Report 19, Digital, System Research Center, Palo Alto, CA, 1987. 6