Lecture IV Bézier Curves

Similar documents
Design considerations

08 - Designing Approximating Curves

CS130 : Computer Graphics Curves (cont.) Tamar Shinar Computer Science & Engineering UC Riverside

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

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

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

Curves. Computer Graphics CSE 167 Lecture 11

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

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

CS130 : Computer Graphics Curves. Tamar Shinar Computer Science & Engineering UC Riverside

Introduction to Computer Graphics

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

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

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

Computer Graphics Curves and Surfaces. Matthias Teschner

Curve and Surface Basics

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

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

Properties of Blending Functions

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

2D Spline Curves. CS 4620 Lecture 18

Rendering Curves and Surfaces. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

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

ECE 600, Dr. Farag, Summer 09

Surfaces for CAGD. FSP Tutorial. FSP-Seminar, Graz, November

2D Spline Curves. CS 4620 Lecture 13

Curves and Surfaces Computer Graphics I Lecture 9

MA 323 Geometric Modelling Course Notes: Day 14 Properties of Bezier Curves

Sung-Eui Yoon ( 윤성의 )

Roadmap for tonight. What are Bezier curves (mathematically)? Programming Bezier curves (very high level view).

Computer Graphics Splines and Curves

Outline. Properties of Piecewise Linear Interpolations. The de Casteljau Algorithm. Recall: Linear Interpolation

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

Computergrafik. Matthias Zwicker. Herbst 2010

3D Modeling Parametric Curves & Surfaces

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

Parametric curves. Brian Curless CSE 457 Spring 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Outline. The de Casteljau Algorithm. Properties of Piecewise Linear Interpolations. Recall: Linear Interpolation

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

Curves and Surfaces. Shireen Elhabian and Aly A. Farag University of Louisville

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

Splines. Connecting the Dots

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

Curves and Surfaces Computer Graphics I Lecture 10

and the crooked shall be made straight, and the rough ways shall be made smooth; Luke 3:5

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Information Coding / Computer Graphics, ISY, LiTH. Splines

A Curve Tutorial for Introductory Computer Graphics

Curve Construction via Local Fitting

Bezier Curves, B-Splines, NURBS

Curves, Surfaces and Recursive Subdivision

(Spline, Bezier, B-Spline)

CS-184: Computer Graphics

Dgp _ lecture 2. Curves

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

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.

Rational Bezier Curves

Computer Graphics I Lecture 11

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

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

Bezier Curves. An Introduction. Detlef Reimers

Introduction to Geometry. Computer Graphics CMU /15-662

Curves and Surfaces 1

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

Computer Graphics Spline and Surfaces

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

Further Graphics. Bezier Curves and Surfaces. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

A Practical Review of Uniform B-Splines

Geometric Modeling of Curves

Subdivision Surfaces

CS3621 Midterm Solution (Fall 2005) 150 points

Review of Tuesday. ECS 175 Chapter 3: Object Representation

Curves and Surfaces for Computer-Aided Geometric Design

COMP3421. Global Lighting Part 2: Radiosity

The Essentials of CAGD

Intro to Curves Week 4, Lecture 7

Name: Let the Catmull-Rom curve q(u) be defined by the following control points: p 1 = 0, 1 p 2 = 1, 1 p 3 = 1, 0. p 2. p 1.

Curves and Curved Surfaces. Adapted by FFL from CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006

Intro to Curves Week 1, Lecture 2

Computer Graphics. Curves and Surfaces. Hermite/Bezier Curves, (B-)Splines, and NURBS. By Ulf Assarsson

Keyword: Quadratic Bézier Curve, Bisection Algorithm, Biarc, Biarc Method, Hausdorff Distances, Tolerance Band.

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

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

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

Intro to Modeling Modeling in 3D

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

Lecture 9: Introduction to Spline Curves

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

INF3320 Computer Graphics and Discrete Geometry

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

CGT 581 G Geometric Modeling Curves

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

Objects 2: Curves & Splines Christian Miller CS Fall 2011

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

The Free-form Surface Modelling System

An Introduction to B-Spline Curves

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

03 Vector Graphics. Multimedia Systems. 2D and 3D Graphics, Transformations

Transcription:

Lecture IV Bézier Curves

Why Curves?

Why Curves?

Why Curves?

Why Curves?

Why Curves? Linear (flat) Curved Easier More pieces Looks ugly Complicated Fewer pieces Looks smooth

What is a curve? Intuitively: what you can draw with a pen without lifting it up Mathematically: image of a continuous mapping of an interval into the plane (or higher-d space) [ ] 7

Types of curves Normal (two endpoints) Closed loops (no endpoints) Infinite curves (no endpoints) 8

More curves Curves may self-intersect, have sharp corners, trace back on themselves, Well-known curves: line segment, line, circle, ellipse, square (boundary), parabola, circular arc, General curves are called free-form curves 9

Curve Representations Implicit Defined as zero set of a function Parameterised Defined as image of a function

Blending functions I want to create a curve that follows a sequence of points

Blending functions I want to create a curve that follows a sequence of points

Blending functions I want to create a curve that smoothly follows a sequence of points

Blending functions I want to create a curve that smoothly follows a sequence of points

Interpolation vs. approximation Interpolation means passing through given points, approximation means getting close to given points and are interpolated and are approximated

Blending functions Blending functions (or basis functions) specify how to mix the control points Let b be a vector of blending functions b i : R R f(t) = Σ i b i (t)p i Σ i b i (t) = 1 b i (t) specifies how much p i weighs at time t

Blending functions A piecewise-linear curve (polygonal line) can be defined using blending functions 1 b 1 (u) b 0 (u) b ( u) 2 0 2u 1 0 u 0.5 0.5 u 1 0 1 0.5 u f( u) b u 0( u) p0 b1 ( u) p1 b2 ( ) p2

Blending functions 0 1 0.5 u 1 2 2 2u u u b ) ( 2 0 2 3 1 u u u b ) ( 2 1 4 4 u u u b ) ( 2 2 1 2 0 2 2 4 4 2 3 1 p p p ) ( ) ( ) ( u u u u u u

Bernstein Polynomials

Bezier curves A Bezier curve uses Bernstein polynomials as blending functions A degree-d Bezier curve has d+1 control points It passes through the first and last control point, and approximates the d 1 other control points Cubic (degree-3) Bezier curves are most common; several of these are connected into one curve 20

Bezier curves Cubic Bezier curves are used for font definitions They are also used in Adobe Illustrator and many other illustration/drawing programs 21

Bezier curves Parameter u, first control point at u=0 and last control point p d at u=1 Derivative at is the vector, scaled by d Derivative at p d is the vector p d-1 p d, scaled by d Second, third,, derivatives at depend on the first three, four,, control points 22

Cubic Bezier curve example 3 3

Quintic Bezier curve example 5 p 4 p 5 p p4 p5 0 5 p 4 p 5

Bezier curves degrees 2 (left) up to 6 (right) 25

Properties of Bezier curves The Bezier curve is bounded by the convex hull of the control points intersection tests with a Bezier curve can be avoided if there is no intersection with the convex hull of the control points

Properties of Bezier curves Any line intersects the Bezier curve at most as often as that line intersects the polygonal lie through the control points (variation diminishing property) 27

Properties of Bezier curves A Bezier curve is symmetric: reversing the control points yields the same curve, parameterized in reverse p 4 p 5 p 4 p5 28

Properties of Bezier curves A Bezier curve is affine invariant: the Bezier curve of the control points after an affine transformation is the same as the affine transformation applied to the Bezier curve itself (affine transformations: translation, rotation, scaling, skewing/shearing) p 4 p 4 p 5 p 5 29

Properties of Bezier curves There are simple algorithms for Bezier curves evaluating subdividing a Bezier curve into two Bezier curves allows computing intersections of Bezier curves p( u) d k 0 C( d, k) u k (1 u) d k p k the point at parameter value u on the Bezier curve 30

Intuition for Bezier curves Keep on cutting corners to make a smoother curve In the limit, the curve becomes smooth 31

Intuition for Bezier curves Suppose we have three control points,, ; a linear connection gives two edges Take the middle of, and the middle p 4 of and place p 1 in the middle of and p 4 Recurse on,, p 1 and also on p 1, p 4, p 1 p4 p 1 gives a quadratic Bezier curve 32

De Casteljau algorithm Generalization of the subdivision scheme just presented; it works for any degree Given points,,, p d Choose the value of u where you want to evaluate Determine the u-interpolation for, for,, and for p d-1 p d, giving d 1 points If one point remains, we found f(u), otherwise repeat the previous step with these d 1 points 33

De Casteljau algorithm u = 1/3 34

De Casteljau algorithm u = 1/3 35

De Casteljau algorithm u = 1/3 36

De Casteljau algorithm u = 1/3 one point remains, the point on the curve at u = 1/3 37

Splitting a Bezier curve The De Casteljau algorithm can be used to split a Bezier curve into two Bezier curves that together are the original Bezier curve r 1 q r 0 q 3 2 r 2 q 1 r 3 q 0 38

Splitting a Bezier curve Splitting a Bezier curve is useful to find line-bezier or Bezier-Bezier intersections u = ½ 39

Intersecting a Bezier curve To test if some line L intersects a Bezier curve with control points,,, p d, test whether L intersects the poly-line,,, p d If not, L does not intersect the Bezier curve either Otherwise, split the Bezier curve (with u = ½ ) and repeat on the two pieces 40

Intersecting a Bezier curve If the line L separates the two endpoints of a Bezier curve, then they intersect Repeating the split happens often only if the line L is nearly tangent to the Bezier curve 41

Intersecting a Bezier curve If the line L separates the two endpoints of a Bezier curve, then they intersect Repeating the split happens often only if the line L is nearly tangent to the Bezier curve 42

Intersecting a Bezier curve When determining intersection of a line segment and a Bezier curve we must make some small changes 43

Splitting a Bezier curve for rendering Splitting a Bezier curve several times makes the new Bezier curve pieces be closer and closer to their control polygons At some moment we can draw the sequence of control polygons of the pieces and these will approximate the Bezier curve well (technically this approximation is only C 0 ) 44

Splitting a Bezier curve for rendering u = ½ 45

Splitting a Bezier curve for rendering 46

Splitting a Bezier curve for rendering 47

Splitting a Bezier curve for rendering 48

Splitting a Bezier curve for rendering 49

Splitting a Bezier curve for rendering 50

Splitting a Bezier curve for rendering u = 1/4 u = 1/2 u = 3/4 51

Splitting a Bezier curve for rendering u = 1/4 u = 1/2 u = 3/4 52

Splitting a Bezier curve for rendering u = 1/4 u = 1/2 u = 3/4 53

Splitting a Bezier curve for rendering 54

3D Bezier surfaces The 16 blending functions for cubic Bezier surfaces 55

Summary Bezier curves are elegant curves that pass through the start and end points and approximate the points in between They exist of any order (degree) but cubic is most common and useful Continuity between consecutive curves can be ensured The De Casteljau algorithm is a simple way to evaluate or split a Bezier curve 56