Lecture 2.2 Cubic Splines

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

An introduction to interpolation and splines

Parameterization. Michael S. Floater. November 10, 2011

2D Spline Curves. CS 4620 Lecture 13

Parameterization of triangular meshes

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

Lecture 9: Introduction to Spline Curves

Representing Curves Part II. Foley & Van Dam, Chapter 11

Intro to Curves Week 4, Lecture 7

Curves and Surfaces 1

Bezier Curves, B-Splines, NURBS

Curves and Surfaces Computer Graphics I Lecture 9

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Curves and Surfaces Computer Graphics I Lecture 10

Sung-Eui Yoon ( 윤성의 )

Four equations are necessary to evaluate these coefficients. Eqn

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

2D Spline Curves. CS 4620 Lecture 18

Intro to Curves Week 1, Lecture 2

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

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

CSE 167: Introduction to Computer Graphics Lecture 12: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

(Refer Slide Time: 00:02:24 min)

Central issues in modelling

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

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

Curves. Computer Graphics CSE 167 Lecture 11

Computer Graphics Curves and Surfaces. Matthias Teschner

1.2 Numerical Solutions of Flow Problems

Chapter 18. Geometric Operations

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

TO DUY ANH SHIP CALCULATION

Module 3 Mesh Generation

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Year 6 Mathematics Overview

Computergrafik. Matthias Zwicker. Herbst 2010

CS 450 Numerical Analysis. Chapter 7: Interpolation

Advanced Turbomachinery Methods. Brad Hutchinson ANSYS, Inc. Industry Marketing

The Free-form Surface Modelling System

1 Trajectories. Class Notes, Trajectory Planning, COMS4733. Figure 1: Robot control system.

Introduction to Computer Graphics

New Swannington Primary School 2014 Year 6

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics

Driven Cavity Example

Unit 3 Higher topic list

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 36

B-spline Curves. Smoother than other curve forms

For each question, indicate whether the statement is true or false by circling T or F, respectively.

Number and Place Value

Number- Algebra. Problem solving Statistics Investigations

FOUNDATION HIGHER. F Autumn 1, Yr 9 Autumn 2, Yr 9 Spring 1, Yr 9 Spring 2, Yr 9 Summer 1, Yr 9 Summer 2, Yr 9

Parametric Curves. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Fast marching methods

Geometric Modeling of Curves

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Natural Quartic Spline

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

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

7 Fractions. Number Sense and Numeration Measurement Geometry and Spatial Sense Patterning and Algebra Data Management and Probability

Chapter 7 Practical Considerations in Modeling. Chapter 7 Practical Considerations in Modeling

Number Mulitplication and Number and Place Value Addition and Subtraction Division

PO 2. Identify irrational numbers. SE/TE: 4-8: Exploring Square Roots and Irrational Numbers, TECH: itext; PH Presentation Pro CD-ROM;

AQA GCSE Maths - Higher Self-Assessment Checklist

Chapter 15 Introduction to Linear Programming

CS770/870 Spring 2017 Curve Generation

Geometric Transformations

Rational Bezier Curves

ECE 600, Dr. Farag, Summer 09

8 Piecewise Polynomial Interpolation

Linear Equation Systems Iterative Methods

form. We will see that the parametric form is the most common representation of the curve which is used in most of these cases.

Information Coding / Computer Graphics, ISY, LiTH. Splines

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

Intro to Modeling Modeling in 3D

Y6 MATHEMATICS TERMLY PATHWAY NUMBER MEASURE GEOMETRY STATISTICS

3D Modeling Parametric Curves & Surfaces

Functions and Transformations

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

Finite Element Analysis Prof. Dr. B. N. Rao Department of Civil Engineering Indian Institute of Technology, Madras. Lecture - 24

8. BASIC TURBO MODEL WITH UNSTRUCTURED MESH

B-Splines and NURBS Week 5, Lecture 9

Beams. Lesson Objectives:

Curves, Surfaces and Recursive Subdivision

Shape Modeling. Differential Geometry Primer Smooth Definitions Discrete Theory in a Nutshell. CS 523: Computer Graphics, Spring 2011

Birkdale High School - Higher Scheme of Work

Almost Curvature Continuous Fitting of B-Spline Surfaces

CS-184: Computer Graphics

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

Year 6 programme of study

Use decimal notation for tenths, hundredths and thousandths

Mathematics Year 9-11 Skills and Knowledge Checklist. Name: Class: Set : 1 Date Year 9 MEG :

Alaska Mathematics Standards Vocabulary Word List Grade 7

Montana Instructional Alignment HPS Critical Competencies Mathematics Honors Pre-Calculus

Expected Standards for Year 6: Mathematics Curriculum (taken from ncetm progression maps)

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

Year 6 Maths Long Term Plan

Section 4.3: Derivatives and the Shapes of Curves

Transcription:

Lecture. Cubic Splines

Cubic Spline The equation for a single parametric cubic spline segment is given by 4 i t Bit t t t i (..) where t and t are the parameter values at the beginning and end of the segment. (t) is the position vector of any point on the cubic spline segment. Let and be the position vectors at the end points of the spline segment (see Fig...). Fig.. Schematic of a spline segment

(t) = [x(t) y(t) z(t)] is a vector valued function. The three components of (t) are the Cartesian coordinates of the position vector. Each component has a similar formulation to (t), i.e., 4 i x t Bixt t t t i 4 i y t Biyt t t t i 4 i z t Bizt t t t i The coefficients B i are determined by specifying four boundary conditions for the spline segment. Expanding Eq. (..) gives 3 t B Bt B3t B4t t t t (..) 3

Also let and, derivatives with respect to t, be the tangent vectors at the end points of the spline segment, refer Fig.... Differentiating Eq. (..) yields 4 ' [ ' ' ' ] i i i t x t y t z t B i t t t t (..3) Expanding Eq. (..3) gives t B B t 3B t t t t ' 3 4 (..4) Assuming, without loss of generality, that t = 0, and applying the four boundary conditions, (0) = (..5a) (t ) = (..5b) (0) = (..5c) (t ) = (..5d) 4

Using the four Eqns. (..5), the four unknown coefficients B i, i =,,3,4 can be evaluated. Specifically for i =,, 3, 4 (0) = B = 4 ' ' 0 i i i t 0 i t B B (..6a) (..6b) 4 i 3 i 3 4 i t t t B t B B t B t B t (..6c) 4 i i 3 3 4 i t t t i t B B B t B t (..6d) 5

Solving for B 3 and B 4 yields and B 3 ' ' 3 t t t B ' ' 4 3 t t t (..7a) (..7b) B, B, B 3 and B 4 determine the cubic spline completely. This completes the computation of the coefficients for one coordinate (x or y or z) of a spline segment. Notice that the value of the parameter t = t at the end of the segment occurs in the results. Since each of the end position and tangent vectors has three components, the parametric equation and hence the shape of the cubic space curve depends on twelve vector components and the parameter value t at the ends of the 6 segment.

Substituting (..6) and (..7) into (..) gives the required cubic spline: 3 t t t t ' ' ' ' ' 3 3 t t t t t t Equation (..8) represents a single cubic spline segment. (..8) However, to represent a complete curve, multiple segments are joined together. Two adjacent segments are shown in Figs... and..3, one with points, and 3 and the other with generalized points k, k+ and k+. Referring to Fig..., assume that the position vectors,, 3, the tangent vectors,, 3 and the parameter values t, t 3 are known. Eq. (..8), applied to each of the two segments yields their shapes. 7

Fig.. Multiple segments However, it is unlikely that the tangent vector at the internal joint between the two segments is known. The internal tangent vector can be determined by imposing a continuity condition of the derivation at the internal joint. Recall that a piecewise spline of degree K has continuity of order (K-) at the internal joints. Thus, a cubic spline has second order continuity at the internal joints. This means that the second derivative (t) is continuous across the joints; i.e., the curvature is also continuous across the joint. 8

Differentiating Eq. (..) twice gives 4 i 3 t i i Bit t t t i 3 (..9) Noting that for the first cubic spline segment the parameter range is 0 t t,evaluating Eq. (..9) at the end of the segment where t = t gives 6B4t B3 (..9a) For the second cubic spline segment the parameter range is t t t 3. Evaluating Eq. (..9) at the beginning of this second segment, where t = 0, yields B 3 (..9a) 9

Equating (..9a) and (..9b) and then using (..6a, b) and (..7a) gives 3 6t ' ' ' ' 3 t t t t t t 3 ' ' 3 3 t3 t3 t3 Here the left hand side of the equation represents the curvature at the end of the first segment and the right hand side is the curvature at the beginning of the second segment. Multiplying by t t 3 and simplifying gives 3 t t t t t t ' ' ' 3 3 3 3 3 tt 3 (..0) 0

Equation (..0) can be solved for, the unknown tangent vector at the internal joint. Again notice that the end values of the parameter t, i.e., t and t 3, occur in the resulting equation. These results can be generalized for n data points to give n piecewise cubic spline segments with position, slope and curvature, i.e., C continuity at the internal joints. Now, using the notation shown in Fig...3 the generalized equation for any two adjacent cubic spline segments k (t) and k+ (t) can be written as follows: 3 t t t ' ' ' k k k k k k k tk tk tk ' ' k k k k 3 t 3 k k k (..) t t t

for the first segment, and 3 t t t ' ' ' k k k k k k k tk tk tk ' ' k k k k 3 t 3 tk tk tk (..) for the second segment. Recall that the parameter range begins at zero for each segment, for the first segment 0 t t k+ and for the second 0 t t k+. For any two adjacent spline segments, the second derivatives at the common internal joint are equated. In other words, letting k (t k ) = k+ (0), yields the generalized result, equivalent to Eq. (..0).

It is given by t t t t ' ' ' k k k k k k k t k 3 t k t t k n k k k k k k (..3) Equation (..3) is used for determining the tangent vector at the internal joint between any two spline segments k and k+. Applying Eq. (..3) recursively over all the spline segments yields (n ) equations for the determination of tangent vectors k, k n. 3

In matrix form, the result is t t t t 0.... 3 3 0 t t t t 0... ' ' ' 3 ' n 4 3 4 3 0 0 t t t t 0.. 3 3 4 5 4 5 4.................... 0 t t t t.. t n 3 t 3 tt 3 tt n t t 3 3 t t 3 4 3 4 3 t n n n... t n n n n n n n (..4) or [M*][ ] = [R] 4

Since there are only n equations for the n tangent vectors, [M*] is not square and thus cannot be inverted to obtain the solution for [ ]; i.e., the problem is indeterminate. By assuming that the end tangent vectors and n are known, the problem becomes determinant. The matrix formulation is now [M][ ] = [R] (..5) Here, [M] is a square matrix and invertible. Notice also that [M] is tri-diagonal, which reduces the computational work required to invert it. Further, [M] is diagonally dominant. Hence it is nonsingular, and inversion yields a unique solution. 5

The equation (..5) can be expanded as 0...... t t t t 0.... 3 3 0 t t t t 0... ' ' ' 3 ' n 4 3 4 3 0 0 t t t t 0.. ' 3 3 4 5 4 5 4.................... 0 t t t t 3 3 3 4 3 4 n n n n...... 0.. t n ' n 3 t 3 tt 3 tt n t t t t... 3 t t n n n n n n 6

The solution for [ ] is thus [ ] = [M] - [R] (..6) Once the k s are known, the coefficients (B) for each spline segment can be determined. Generalizing Eqs. (..6) (..) gives B B k k 3 ' ' k k k k 3k tk tk tk B 3 B ' ' k k k k 4k 3 tk tk tk k ' k 7

Since k and k are vector valued, B i are also vector valued. That is, if the k and k have x, y, z components then the B i also have the corresponding x, y, z components. In the matrix form, the equations for B for any spline segment k are: B B B B B k k 3k 4k 0 0 0 0 0 0 ' 3 3 k k k k k k t t t t t t t t 3 3 k k k k ' k k (..7) 8

To generate a piecewise cubic spline through n given position vectors k, k n, with end tangent vectors and n, Eq. (..6) is used to determine the internal tangent vectors k, k n. Then for each piecewise cubic spline segment the end position and tangent vectors for that segment are used to determine the B ik s, i 4 for that segment using Eq. (..7). Finally the generalization of Eq. (..) gives 4 i k ik k i t B t 0 t t, k n (..8) Now, Eq. (..8) can be used to determine points on the spline segment. 9

In matrix form Eq. (..8) becomes 3 B k k t t t t 0 t t B Substituting Eq. (..7) and rearranging yields B B k 3k 4k k (..9) T F T F T F T F T k k 3 4 ' k ' k 0 T 0 k n (..0) Eq. (..0) is written in matrix form as k (T) = [F][G] (..) k 0

F is called a matrix of blending or weighing functions and G is a matrix of geometric conditions. T t t k F T T T k k 3 3 F T T 3T 3 F T T T T t 3k k F T T T T t 4k k (..a) (..b) (..c) (..d) The form of Eq. (..0) frequently appears in curve and surface descriptions.

Generation of Cascade Geometries Figure..3 shows an example of a turbomachinery cascade. All the boundaries of a typical block consisting of two straight line segments L and L and three curves C, C and C 3. In Module it has been shown that the flow through turbomachinery passages is generally studied through cascade models. Two-dimensional cascades of stator and rotor rows at the midspan of turbine stages are introduced here as physical models relevant to the problem of turbine rotor-stator interactions. The blade profiles determine the turbomachinery passages with high turning of flow through them. For the rotor blades the physical models need to be developed for use in relative motion, capable of giving accurate and computationally efficient numerical solutions.

Fig...3 Boundaries of a typical computational block 3

The model represented in Fig...4 considers that the stator and rotor with equal pitches. Therefore the computational domain, shown with solid lines in Fig...4, consists of single passages of stator and rotor with periodic boundaries. However the periodic boundaries get extended over multiple passages when the stator and rotor pitches are unequal. For example, as the stator to rotor pitch ratio is.5 in the model presented in Fig...5, two stator and three rotor passages are taken for computation. In Fig...4 the periodic pairs of the boundary are curves {C and C } for the stator and {C 3 and C 4 } for the rotor. Similarly the periodic pairs in Fig...5 are {C and C }, {C 3 and C 4 } and {C 5 and C 6 } for the first-stage stationary row, first-stage rotating row and second-stage stationary row to enable consideration of a multi-stage problem.

Fig...4 The physical model for the analysis of a turbine stage (Equal stator and rotor pitches) 5

Fig...5 The physical model for the analysis of a turbine stage (Unequal stator and rotor pitches) 6

Generation of Blade rofiles Using Splines It is shown that line segments of arbitrary shaped curve can be generated by specifying a set of several coordinate points. However, for obtaining smooth and accurate arbitrary curve such as the blade profile, the coordinates of a large number of points on the curve are required. They are found from a limited number of known points on the curve by using spline fitting techniques. The nodes are then selected from the large number of coordinates obtained by spline fitting.

As the spacing between nodes on the boundary curve varies along the curve, the curve is first divided into segments, say six, as shown in Fig...6 (a). The number and distribution of nodes placed on each boundary segment varies depending on the grid density distribution within the domain. For the blade profile shown in Fig...6, it is required to have fine grids near the leading and trailing edges. Therefore, the distance between two adjacent nodes at the leading edge and trailing edge regions should be reducing towards the respective forward and rear stagnation points. 8

Fig...6 Boundary discretization of an airfoil (a) Subdivision of an airfoil 9

For providing such a distribution of nodes, a simple and generalised method is used by adopting the following exponential stretching function. i L e S N i (..3) Here δ i is the distance along the curve of the i th point from the starting point of the curve, L is the length of the curve, N is the total number of divisions required and S is the stretching factor. The purpose of the stretching factor is to vary the distance between two adjacent nodes. A negative value for S leads to close nodes near the starting point of the curve and vice versa. Large values of S leads to increase in stretching, very small values of S (say, S < 0.00) results in almost uniform division of 30 the curve. N e S

Figure..6 (b) shows the pattern of discretization of the segment-i of the curve obtained using a stretching factor S = and N = 0. Figure..6 (c) shows the distribution of points on segment-iv of the curve obtained using a positive value of for S and with N = 0. It can be seen that close points are obtained near the end of the curve. The procedure described for boundary discretization and generation of large number of data points on the boundary by spline fitting is again used for the purpose of grid generation of an aerofoil. Figure..6(d) shows the discretization of the entire aerofoil. 3

Fig...6 Boundary discretization of an airfoil (b) Discretization of segment-i (c) Discretization of segment-iv 3

Fig...6 Boundary discretization of an airfoil (d) The fully discretized airfoil 33

Summary of Lecture. Cubic spline is one of the popular technique used for generating space curves. The procedure for generating spline curves is illustrated. END OF LECTURE. 34