Splines, or: Connecting the Dots. Jens Ogniewski Information Coding Group

Similar documents
Splines. Connecting the Dots

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.

Information Coding / Computer Graphics, ISY, LiTH. Splines

On the Parameterization of Catmull-Rom Curves. Cem Yuksel Scott Schaefer John Keyser Texas A&M University

Handout 4 - Interpolation Examples

Computer Graphics Curves and Surfaces. Matthias Teschner

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

Spline Notes. Marc Olano University of Maryland, Baltimore County. February 20, 2004

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

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

Animating Transformations

Shape modeling Modeling technique Shape representation! 3D Graphics Modeling Techniques

Parametric curves. Reading. Curves before computers. Mathematical curve representation. CSE 457 Winter Required:

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Introduction to Computer Graphics

CS 559 Computer Graphics Midterm Exam March 22, :30-3:45 pm

Manipulator trajectory planning

2D Spline Curves. CS 4620 Lecture 18

EECS 487, Fall 2005 Exam 2

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

Parametric curves. Brian Curless CSE 457 Spring 2016

Properties of Blending Functions

Parametric Surfaces. Michael Kazhdan ( /657) HB , FvDFH 11.2

CS354 Computer Graphics Surface Representation IV. Qixing Huang March 7th 2018

Friday, 11 January 13. Interpolation

Kochanek-Bartels Cubic Splines (TCB Splines)

3D Modeling techniques

On Smooth Bicubic Surfaces from Quad Meshes

2D Spline Curves. CS 4620 Lecture 13

A Curve Tutorial for Introductory Computer Graphics

Lecture IV Bézier Curves

Animation Curves and Splines 2

Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Sung-Eui Yoon ( 윤성의 )

AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO F ^ k.^

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

Curves and Surfaces 1

Trajectory Planning for Automatic Machines and Robots

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

Spline Morphing. CG software practical course in the IWR. Carl Friedrich Bolz. Carl Friedrich Bolz

Video 11.1 Vijay Kumar. Property of University of Pennsylvania, Vijay Kumar

Numerical Methods in Physics Lecture 2 Interpolation

Curves. Computer Graphics CSE 167 Lecture 11

Computer Animation. Rick Parent

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

Parameterization. Michael S. Floater. November 10, 2011

Interpolating/approximating pp gcurves

Circular Arcs as Primitives for Vector Textures

Curves D.A. Forsyth, with slides from John Hart

Rational Bezier Curves

Central issues in modelling

From curves to surfaces. Parametric surfaces and solid modeling. Extrusions. Surfaces of revolution. So far have discussed spline curves in 2D

Computer Graphics I Lecture 11

B-spline Curves. Smoother than other curve forms

Subdivision Surfaces

CIS 665 GPU Programming and Architecture

GRK. dr Wojciech Palubicki

ME 261: Numerical Analysis Lecture-12: Numerical Interpolation

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions.

February 2017 (1/20) 2 Piecewise Polynomial Interpolation 2.2 (Natural) Cubic Splines. MA378/531 Numerical Analysis II ( NA2 )

Intro to Curves Week 4, Lecture 7

Bezier Curves, B-Splines, NURBS

Rotoscoping: Animation at its Finest. Rotoscoping is an animation technique in which animators manually trace shapes

Interpolation and Basis Fns

15.10 Curve Interpolation using Uniform Cubic B-Spline Curves. CS Dept, UK

Implicit Generalized Cylinders using Profile Curves

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

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

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

Design considerations

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

PathInterpolatR. August 30, 2016

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

Subdivision Curves and Surfaces: An Introduction

Multiple-Choice Test Spline Method Interpolation COMPLETE SOLUTION SET

Connected Minimal Acceleration Trigonometric Curves

Objects 2: Curves & Splines Christian Miller CS Fall 2011

Sculpting 3D Models. Glossary

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

Spline Curves. Spline Curves. Prof. Dr. Hans Hagen Algorithmic Geometry WS 2013/2014 1

Final Exam: Precalculus

City Research Online. Permanent City Research Online URL:

A Practical Review of Uniform B-Splines

Freeform Curves on Spheres of Arbitrary Dimension

Prof. Fanny Ficuciello Robotics for Bioengineering Trajectory planning

Intro to Curves Week 1, Lecture 2

Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches

Remark. Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 331

Fundamentals of Computer Animation

Computer Graphics II

Image Morphing. The user is responsible for defining correspondences between features Very popular technique. since Michael Jackson s clips

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

A Continuous 3-D Medial Shape Model with Branching

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

Animation. Itinerary. What is Animation? What is Animation? Animation Methods. Modeling vs. Animation Computer Graphics Lecture 22

Cubic Spline Questions

Spline Guided Path of a Mobile Robot with Obstacle Avoidance Characteristics

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Transcription:

Splines, or: Connecting the Dots Jens Ogniewski Information Coding Group

Note that not all is covered in the book, especially Change of Interpolation Centripetal Catmull-Rom and other advanced parameterization schemes Own creation of interpolation methods More advanced Color interpolation These parts will not be part of the exam, but are given merely for your own information 1 / 20

Interpolation Splines The points are blended together using blending functions All blending functions are zero or 1 at the control points! 2 / 20

Catmull-Rom Splines Also called cardinal splines Calculated from 4 control points, defined between the middle two Specified only by the control points, and a tension parameter to adjust the shape 3 / 20

Catmull-Rom Splines F CR(u) = 1 0 ( αu 3 + 2αu 2 αu)p 1 + ((2 α)u 3 + (α 3)u 2 + 1)P 0 + ((α 2)u 3 + (3 2α)u 2 + αu)p +1 + (αu 3 αu 2 )P +2 The equations found in the book can be reached by using the standard parameterization of α = 0.5 Red: polynomial for P 1 Green: polynomial for P 0 Blue: polynomial for P +1 Cyan: polynomial for P +2 4 / 20

Catmull-Rom Splines Rewrite: F CR(u) = αu(u 1) 2 (P +1 P 1 ) + αu 2 (u 1)(P +2 P 0 ) + u 2 (3 2u)(P +1 P 0 ) + P 0 The first two rows set the tangents in the endpoints u = 0 and u = 1 respectively, while being 0 at both endpoints The rest interpolates between P 0 and P +1, while having a zero tangent in both endpoints If you know what derivatives you want to have in the endpoints, you can set them accordingly (rather than using Catmull-Rom) 5 / 20

Catmull-Rom Splines F CR(u) = αu(u 1) 2 (P +1 P 1 ) + αu 2 (u 1)(P +2 P 0 ) + u 2 (3 2u)(P +1 P 0 ) + P 0 The polynomials (left) and their derivatives (right) Red: blending polynomial for the tangent in point u = 0 Blue: blending polynomial for the tangent in point u = 1 Green: blending polynomial for the points between 0 which we interpolate 1 6 / 20 1 0

Example: Change of Ongoing Interpolation 4 Planned motion through 4 points (1 to 4), e.g. animationpath, robot movement, using Catmull-Rom 3 1 2 7 / 20

Example: Change of Ongoing Interpolation 4 In point P we discover an previously unknown obstacle 3 P 1 2 8 / 20

Example: Change of Ongoing Interpolation 4 We find a point P +1,new to circumvent it, start a new interpolation in P and set the tangent in this point to P to maintain C 1 continuity; after this segment we interpolate as normal. 3 P P +1,new 1 2 9 / 20

Example: Change of Ongoing Interpolation 4 Thus we are able to get a new, fully C 1 continuous curve that circumvents the obstacle. 3 P P +1,new 1 2 10 / 20

Parameterization Red: Standard Catmull-Rom, Blue: Centripetal Catmull-Rom 11 / 20

Parameterization High differences in segment lengths can lead to unwanted artifacts like e.g. loops Can be solved by normalizing the tangent vectors But needs a similar scaling of the interpolation vector (the vector between the two endpoints of the current vector) as well Correct solution is unfortunately complicated Best solution centripetal Catmull-Rom Implementations are available For more information: Chem Yuksel et al.: Parameterization and Applications of Catmull-Rom Curves 12 / 20

Selecting Your Own Spline Often: Surfaces, curves: approximating, G 1 or G 2 Object animation: interpolating, C 1 Camera movement: interpolating, G 2 Color: trigonometric or interpolating, C 1 13 / 20

Selecting/Creating Your Own Spline The good: standard implementations available for most algorithms Also: Interpolation is not that complicated => with a little effort you can create your own scheme or adapt an existing one The bad: knowing your requirements might be tricky Often made mistake: overconstraining it, leading to artifical look 14 / 20

Example: Artifact-Free Color-Interpolation In the following we successively refine our requirements 15 / 20

Example: Artifact-Free Color-Interpolation Linear interpolation: continuation artifacts => needs to be (at least) C 1 continuous 16 / 20

Example: Artifact-Free Color-Interpolation Cubic interpolation: clipping, discoloring artifacts => not allowed to leave bounds (0..255) 17 / 20

Example: Artifact-Free Color-Interpolation Trigonometric interpolation: ringing artifacts => needs to be bounded by the surrounding colors 18 / 20

Example: Artifact-Free Color-Interpolation Solution: enforce zero derivatives in the endpoints 19 / 20

Example: Artifact-Free Color-Interpolation But can lead to wrong gradients (see image to the right; input shown to the left) Solution (middle) a little more involved, for more information see also: Jens Ogniewski Artifact-free color interpolation 20 / 20

Thank you for your feedback! jenso@isy.liu.se