Friday, 11 January 13. Interpolation

Similar documents
An introduction to interpolation and splines

5.1 Introduction to the Graphs of Polynomials

Sung-Eui Yoon ( 윤성의 )

Mathematics (

MEI Desmos Tasks for AS Pure

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.

Unit 1: Sections Skill Set

Connected Minimal Acceleration Trigonometric Curves

MATH 31A HOMEWORK 9 (DUE 12/6) PARTS (A) AND (B) SECTION 5.4. f(x) = x + 1 x 2 + 9, F (7) = 0

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

UNIT 3 EXPRESSIONS AND EQUATIONS Lesson 3: Creating Quadratic Equations in Two or More Variables

Properties of Quadratic functions

Grade 9 Math Terminology

4 Visualization and. Approximation

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

Linear, Quadratic, Exponential, and Absolute Value Functions

X Std. Topic Content Expected Learning Outcomes Mode of Transaction

Chapter 2. MathScript

AQA GCSE Further Maths Topic Areas

MATHEMATICS (SYLLABUS D) 4024/21 Paper 2 October/November 2016 MARK SCHEME Maximum Mark: 100. Published

In this course we will need a set of techniques to represent curves and surfaces in 2-d and 3-d. Some reasons for this include

Linear Transformations

MEI GeoGebra Tasks for AS Pure

Sketching graphs of polynomials

ALGEBRA 2 W/ TRIGONOMETRY MIDTERM REVIEW

MEI GeoGebra Tasks for A2 Core

Curves and Surfaces. CS475 / 675, Fall Siddhartha Chaudhuri

Monday, 12 November 12. Matrices

Kevin James. MTHSC 102 Section 1.5 Polynomial Functions and Models

First of all, we need to know what it means for a parameterize curve to be differentiable. FACT:

Mastery. PRECALCULUS Student Learning Targets

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

Curriculum Map: Mathematics

MEI Casio Tasks for A2 Core

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

Section 18-1: Graphical Representation of Linear Equations and Functions

Objectives. Materials

Justify all your answers and write down all important steps. Unsupported answers will be disregarded.

3D Modeling Parametric Curves & Surfaces

Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives

Vertical Line Test a relationship is a function, if NO vertical line intersects the graph more than once

Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET

B-Spline Polynomials. B-Spline Polynomials. Uniform Cubic B-Spline Curves CS 460. Computer Graphics

Voluntary State Curriculum Algebra II

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Sec 4.1 Coordinates and Scatter Plots. Coordinate Plane: Formed by two real number lines that intersect at a right angle.

Properties of Blending Functions

Today is the last day to register for CU Succeed account AND claim your account. Tuesday is the last day to register for my class

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

The Three Dimensional Coordinate System

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

Department Curriculum Map (new GCSE)

Homework #6 Brief Solutions 2012

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313

Fundamentals of Programming CS-110. Lecture 3

VW 1LQH :HHNV 7KH VWXGHQW LV H[SHFWHG WR

1. Answer: x or x. Explanation Set up the two equations, then solve each equation. x. Check

Design considerations

AP Calculus AB. Table of Contents. Slide 1 / 180. Slide 2 / 180. Slide 3 / 180. Review Unit

Int. Adv. Algebra Geometry Solving a Trig. Function Review Name:

AP Calculus AB. Table of Contents. Slide 1 / 180. Slide 2 / 180. Slide 3 / 180. Review Unit

1.1 Functions. Cartesian Coordinate System

MATHEMATICS SYLLABUS SECONDARY 5th YEAR

Objectives. Materials

Interpolation - 2D mapping Tutorial 1: triangulation

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

Chapter P Preparation for Calculus

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Excel tutorial Introduction

More Ways to Solve & Graph Quadratics The Square Root Property If x 2 = a and a R, then x = ± a

CS770/870 Spring 2017 Curve Generation

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

Warm-Up Exercises. Find the x-intercept and y-intercept 1. 3x 5y = 15 ANSWER 5; y = 2x + 7 ANSWER ; 7

1.4. Comparing Graphs of Linear Motion. Acceleration Time Graphs

Mid Term Pre Calc Review

MATH 1101 Exam 4 Review. Spring 2018

Cambridge IGCSE mapping

Overview for Families

Geometry: Angle Relationships

Education Resources. This section is designed to provide examples which develop routine skills necessary for completion of this section.

Semester 2 Review Problems will be sectioned by chapters. The chapters will be in the order by which we covered them.

Vertical and Horizontal Translations

Cubic Splines By Dave Slomer

Mathematics Scope & Sequence Algebra I

Preview Notes. Systems of Equations. Linear Functions. Let y = y. Solve for x then solve for y

Guide to Planning Functions and Applications, Grade 11, University/College Preparation (MCF3M)

Unit 4 Graphs of Trigonometric Functions - Classwork

CS1114 Assignment 5 Part 1

Interpolation and Basis Fns

Curves. Computer Graphics CSE 167 Lecture 11

Graphical Methods Booklet

Core Mathematics 1 Graphs of Functions

Solve Non-Linear Parabolic Partial Differential Equation by Spline Collocation Method

2.2 Graphs Of Functions. Copyright Cengage Learning. All rights reserved.

College Pre Calculus A Period. Weekly Review Sheet # 1 Assigned: Monday, 9/9/2013 Due: Friday, 9/13/2013

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

Lecture 2.2 Cubic Splines

Splines. Connecting the Dots

CW High School. Advanced Math A. 1.1 I can make connections between the algebraic equation or description for a function, its name, and its graph.

Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives

Transcription:

Interpolation

Interpolation Interpolation is not a branch of mathematic but a collection of techniques useful for solving computer graphics problems Basically an interpolant is a way of changing one number into another. For example to change 2 into 4 we simply add 2 which is not particularly useful. The real function of an interpolant is to change one number into another in some number of equal steps

Example If we wish to change 2 into 4 using 10 equal steps we just add 0.2 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 We could then use these values to drive an animated parameter In order to repeat this interpolant for different number we require a formula to work for all given values We can also look at how we can control the speed of change as the above case uses linear steps and we quite often need to ease in or ease out the movement / values

Linear Interpolation A Linear interpolant generates equal spacing between the interpolated values for equal changes in the interpolating parameter. In the previous example the increment 0.2 is calculated by subtracting the first value from the second and dividing by the result by 10 (4-2)/10=0.2 We can formally define this as follows

Linear Interpolation We can use linear interpolation to blend between two values using a real scalar value which ranges from 0-1 The basic formula given two values a and b and the real scalar t we get p = a +(b a) t; This can be written in code as 1 def Lerp( _a, _b, _t) : 2 return _a+(_b-_a)*t

Linear Interpolation 1 1-t t 0.75 The graphs of (1-t) and t over the range 0-1 0.5 0.25 0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 t

Linear Interpolation Linear interpolation can be extended to any number of values For example a 3D point would use the piecewise interpolant of x y and z as shown below This is know as tri-linear interpolation x = x 1 (x 2 y = y 1 (y 2 z = z 1 (z 2 x 1 ) t y 1 ) t z 1 ) t

Linear Interpolation The terms (1-t) and t will always sum to unity over the range 0-1. This is important and will inform other interpolation values The interpolant may also be expressed in matrix form thus n = t 1 apple 1 1 1 0 apple n1 n 2

Non-linear Interpolation A Linear interpolant ensures that equal steps in the parameter t give rise to equal steps in the interpolated values. However it is often required that equal steps in t give rise to unequal steps in the interpolated values. We can achieve this using a variety of mathematical techniques. For example, we could use trigonometric functions or polynomials.

Trigonometric Interpolation From the basic trigonometric ratios we know that sin 2 + cos 2 =1 This satisfies one of the requirements of an interpolant that the terms must sum to 1 If varies between 0 and varies between 1 and 0 and 2 cos2 v varies between 0 and 1 which can be used to modify the sin 2 interpolated values n = n 1 cos 2 t + n 2 sin 2 t 0 apple t apple 2

Trigonometric Interpolation The curves for cos 2 and sin 2 1.00 0.75 0.50 0.25 0 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 angle

Trigonometric Interpolation 4.0 N=1 N=3 3.5 3.0 If we make n1=1 and n2=3 we can plot the curves as shown 2.5 2.0 1.5 If we then apply the interpolant to two 2D points we get the following 1.0 0.5 0 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85

Trigonometric Interpolation Here we see a straight line interpolant However the distribution of the points is non-linear Equal steps in t give rise to unequal distances

Trigonometric Interpolation The main problem with this approach is that it is impossible to change the nature of the curve It is a sinusoid, and its slope is determined by the interpolated values. One way of gaining control over the interpolated curves is to use a polynomial as we shall see next.

Cubic Interpolation In cubic interpolation we need to develop a cubic function to do our blending In mathematics a cubic function is one of the form f(x) =ax 3 + bx 2 + cx + d Applying this to our interpolant we get v 1 = at 3 + bt 2 + ct + d apple n1 or in Matrix form n =[v 1 v 2 ] n 2

Cubic Interpolation The task is to find the values of the constants associated with the polynomials v1 and v2 The requirements are 1. The cubic function v2 must grow from 0 to 1 for 0 apple t apple 1 2. The slope at point t must equal the slope at the point (1-t) this ensures the slope symmetry over the range of the function 3. The value v2 at any point t must also produce (1-v2) at (1-t) this ensures curve symmetry

Cubic Interpolation To satisfy the first requirement : v 2 = at 3 + bt 2 + ct + d and when t=0, v2=0 and d=0 Similarly when t=1, v2=a+b+c

Cubic Interpolation To satisfy the second requirement, we differentiate v2 to obtain the slope dv 2 dt =3at 2 +2bt + c =3a(1 t) 2 +2b(1 t)+c and equating constants we discover c = 0 and 0 = 3a +2b

Cubic Interpolation To satisfy the third requirement a 3 + bt 2 =1 a(1 t) 3 + b(1 t) 2 where we discover 1= a+b But 0=3a+2b therfore a=2 and b=3, therefore v 2 = 2t 3 +3t 2

Cubic Interpolation To find the the curve s mirror curve, which starts at 1 and collapses to 0 as t moves from 0 to 1 we subtract the previous equation from 1 v 1 =2t 3 3t 2 +1 Therefore the polynomials are v 1 =2t 3 3t 2 +1 v 2 = 2t 3 +3t 2

Cubic Interpolation These can be used as interpolants as follows n = v 1 n 1 + v 2 n 2 n = 2t 3 3t 2 +1 2t 3 +3t 2 apple n 1 n 2 2 3 2 2 n = t 3 t 2 t 1 6 4 3 3 0 0 7 5 apple n1 n 2 1 0

Cubic Interpolation Plotting v1 and v2 we get

Cubic Interpolation applying to two points n = v 1 n 1 + v 2 n 2

References Vince, John (2010). Mathematics for Computer Graphics. 2nd. ed. London: Springr Verlag.