CLASS 8 SPLINES CS770/870. Splines Smooth piecewise curves Mostly cubic polynomials Parametric curves Control points Knots Some interpolate (= pass through)

Slides:



Advertisements
Similar presentations
Section 18.2 Computing Line Integrals over Parameterized Curves
Advertisements

The Chain Rule Section 3.6c.
Lecture Notes #11 Curves and Surfaces II
Parametric Curves Ref: 1, 2.
CS 445 / 645 Introduction to Computer Graphics Lecture 22 Hermite Splines Lecture 22 Hermite Splines.
© University of Wisconsin, CS559 Spring 2004
2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Parametric Equations Local Coordinate Systems Curvature Splines
COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 8, 2014 SPLINES CUBIC CURVES HERMITE CURVES BÉZIER CURVES B-SPLINES BICUBIC SURFACES SUBDIVISION SURFACES.
Lecture 10 Curves and Surfaces I
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
CS 445 / 645 Introduction to Computer Graphics Lecture 22 Hermite Splines Lecture 22 Hermite Splines.
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Slide 127 October 1999CS Computer Graphics (Top Changwatchai) Review of Spline Concepts Sections 10-6 to in Hearn & Baker Splines can be 2D.
1cs426-winter-2008 Notes  Ian Mitchell is running a MATLAB tutorial, Tuesday January 15, 5pm-7pm, DMP 110 We won’t be directly using MATLAB in this course,
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
Designing Parametric Cubic Curves Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Curves Mortenson Chapter 2-5 and Angel Chapter 9
Subdivision Primer CS426, 2000 Robert Osada [DeRose 2000]
Modelling: Curves Week 11, Wed Mar 23
RASTER CONVERSION ALGORITHMS FOR CURVES: 2D SPLINES 2D Splines - Bézier curves - Spline curves.
Designing Parametric Cubic Curves
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
IGCSE Revision Lesson 3 I can calculate the gradient of a straight line from the co-ordinates of two points on it I can calculate the length and the co-ordinates.
Equations of Tangent Lines April 21 st & 22nd. Tangents to Curves.
Bresenham’s Algorithm. Line Drawing Reference: Edward Angel’s book: –6 th Ed. Sections 6.8 and 6.9 Assuming: –Clipped (to fall within the window) –2D.
Curves and Surfaces CSE3AGR - Paul Taylor Polynomials of Degree n Degree is equal to the highest exponent of a term. Higher exponents result in.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
Curves.
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
Implicit Differentiation
12.3 Velocity and Acceleration. Projectile Motion.
Chapter VI Parametric Curves and Surfaces
INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.
June D Object Representation Shmuel Wimer Bar Ilan Univ., School of Engineering.
CO Games Development 1 Week 12 Interpolation, Path Smoothing & Splines
Parametric Form of Curves Estimating beam deflection using strain information gained from sensors.
CS559: Computer Graphics Lecture 19: Curves Li Zhang Spring 2008.
Introduction to Numerical Analysis I MATH/CMPSC 455 Splines.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
Cubic Spline Interpolation. Cubic Splines attempt to solve the problem of the smoothness of a graph as well as reduce error. Polynomial interpolation.
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Calculus BC 2014 Implicit Differentiation. Implicit Differentiation Equation for a line: Explicit Form Implicit Form Differentiate the Explicit Differentiation.
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
CS552: Computer Graphics Lecture 19: Bezier Curves.
CS552: Computer Graphics Lecture 18: Representing Cubic Splines.
Introduction to Parametric Curve and Surface Modeling.
Interpolation - Introduction
CSCI480/582 Lecture 9 Chap.2.2 Cubic Splines – Hermit and Bezier Feb, 11, 2009.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 SPLINES
CS5500 Computer Graphics May 11, 2006
CS 445 / 645 Introduction to Computer Graphics
Chapter 10-2: Curves.
Find the derivative of the vector function r(t) = {image}
Designing Parametric Cubic Curves
© University of Wisconsin, CS559 Spring 2004
Chapter XVII Parametric Curves and Surfaces
Derivatives of Polynomials and Exponential Functions
Spline Interpolation Class XVII.
UNIT-5 Curves and Surfaces.
Introduction to Parametric Curve and Surface Modeling
Designing Parametric Cubic Curves
Presentation transcript:

CLASS 8 SPLINES CS770/870

Splines Smooth piecewise curves Mostly cubic polynomials Parametric curves Control points Knots Some interpolate (= pass through) the control points, Others do not.

Hierarchical Bicubic B-Splines

Hermite splines Define end points and gradients. Continuity C0 end points match C1 1 st derivatives match C2 2 nd derivatives match

Splines are parametric polynomials y u y = a +bu + cu 2 +du 3 Splines are arrange to have continuity at the joins (knots) C 0 : The curves touch at the join point. C 1 : The curves also share a common tangent direction at the join point. C 2 : The curves also share a common center of curvature at the join point. y u Continuity At knot

Hermites C1 continuous Matching end points, matching gradients Example: u 1 = 0, y 1 = 2.0, dy 1 /du 1 = 1 u 2 = 1, y 2 = 3.0, dy 2 /du 2 = -2 Find a,b,c,d to define the curve Write out the equation y = a +bu + cu 2 +du 3 dy/du = b + 2cu +3du 2

General derivation For any (y1,g1) (y2,g2)

In C++ _ay = y1; _by = dy1; _cy = 3.0f*(y2 - y1) - 2.0*dy1 - dy2; _dy = 2.0f*(y1 - y2) + dy1 + dy2;

2D Hermites Just do it twice, y is a function of u. x is a function of u. To get a 3D Hermite, just do it 3 times for x, for y and for z. x,y,z all are functions of a common u.

How to calculate normals For the start just define a normal at right angles to the starting forward vector. E.g. start track horizontally F(0,0,1), S(1,0,0), T(010); Do this by defining the gradients. dx/du = 0; dy/dz = 1; dz/du = 1; For the next segment, 0f the 100 segments. Take the cross product of the new forward vector with the old top vector (result a new sideways vector). Take the cross product of the new sideways vector with the new forward vector to get the new top vector.

Construct box Use the vectors. Center +/- halfwidth to get the sides. Center – thickness to define the bottom. Use the normals in the rendering loop.

To make the view follow the object Use gluLookAt(ex,ey,ez,atx,aty,atz,upx,upy,upz); The at position, should be the center of the ball. The up direction should use the top vector Case 1: Wingman, View eye position using the sideways vector Case 2: Above and behind. Use the up vector and the forward vector to define the eye position.

typedef float Point3f[3]; Point3f *BoxTopL, *BoxTopR, *BoxBotL, *BoxBotR; BoxTopL = new Point3f[len]; BoxTopR = new Point3f[len]; BoxBotL = new Point3f[len]; BoxBotR = new Point3f[len]; Draw the top, the bottom, the left, the right.

Natural Cubic splines If we have n control points and n splines we can make a set of curves. Such that end points match (2 dof). First derivatives match (1 dof). Second derivatives match (2 dof). = anglular acceleration But we lose local control. Solve a system of equations.