Question? Leave a message!




Bézier Curves and Splines

Bézier Curves and Splines
Dr.ShaneMatts Profile Pic
Dr.ShaneMatts,United States,Teacher
Published Date:23-07-2017
Website URL
Comment
6.837 Computer Graphics Bézier Curves and Splines Wojciech Matusik MIT CSAIL 6.837 – Matusik vectorportal.com Before We Begin • Anything on your mind concerning Assignment 0? • Any questions about the course? • Assignment 1 (Curves & Surfaces) • Linear algebra review session 2 Today • Smooth curves in 2D – Useful in their own right – Provides basis for surface editing This image is in the public domain Source:Wikimedia Commons 3 Modeling 1D Curves in 2D • Polylines – Sequence of vertices connected by straight line segments – Useful, but not for smooth curves – This is the representation that usually gets drawn in the end (a curve is converted into a polyline) • Smooth curves – How do we specify them? – A little harder (but not too much) 4 Splines • A type of smooth curve in 2D/3D • Many different uses – 2D illustration (e.g., Adobe Illustrator) – Fonts (e.g., PostScript, TrueType) – 3D modeling – Animation: trajectories • In general: interpolation ACM © 1987 “Principles of and approximation traditional animation applied to 3D computer animation” © ACM. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 5 Demo 6 How Many Dimensions? 7 How Many Dimensions? This curve lies on the 2D plane, but is itself 1D. 8 How Many Dimensions? This curve lies on You can just as well the 2D plane, define 1D curves in but is itself 1D. 3D space. 9 Two Definitions of a Curve • A continuous 1D set of points in 2D (or 3D) • A mapping from an interval S onto the plane – That is, P(t) is the point of the curve at parameter t • Big differences – It is easy to generate points on the curve from the 2nd – The second definition can describe trajectories, the speed at which we move on the curve 10 General Principle of Splines • User specifies control points • We will interpolate the control points by a smooth curve – The curve is completely determined by the control points. 11 See http://en.wikipedia.org/wiki/Flat_spline Physical Splines Courtesy of The Antique Boat Museum. 12Two Application Scenarios • Approximation/interpolation – We have “data points”, how can we interpolate? – Important in many applications • User interface/modeling – What is an easy way to specify a smooth curve? – Our main perspective today. Image courtesy of SaphireS on Wikimedia Commons. License: CC-BY- SA. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. 13 Questions? 14 Splines • Specified by a few control points – Good for UI – Good for storage • Results in a smooth parametric curve P(t) – Just means that we specify x(t) and y(t) – In practice: low-order polynomials, chained together – Convenient for animation, where t is time – Convenient for tessellation because we can discretize t and approximate the curve with a polyline 15 Tessellation • It is easy to rasterize mathematical line segments into pixels – OpenGL and the graphics hardware can do it for you • But polynomials and other parametric functions are harder Image courtesy of Phrood on Wikimedia Commons. License: CC-BY-SA.This content is excluded from our Creative Commons license. For moreinformation, see http://ocw.mit.edu/help/faq-fair-use/. 6.837 – Durand 16 Tessellation tn t2 t1 To display P(t), discretize it at discrete ts t0 17 Tessellation tn t2 t1 It’s clear that adding more points will get us closer to the curve. t0 18 Tessellation tn t2 t1 It’s clear that adding more points will get us closer to the curve. t0 19 Interpolation vs. Approximation • Interpolation – Goes through all specified points – Sounds more logical Interpolation • Approximation – Does not go through all points Approximation 20