OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

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

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

Curves and Surface I. Angel Ch.10

Curves and Surfaces Computer Graphics I Lecture 9

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

Intro to Modeling Modeling in 3D

Curves and Surfaces Computer Graphics I Lecture 10

Design considerations

CS 4204 Computer Graphics

Lecture IV Bézier Curves

Curves and Surfaces 1

3D Modeling Parametric Curves & Surfaces

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

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

Rational Bezier Curves

LECTURE #6. Geometric Modelling for Engineering Applications. Geometric modeling for engineering applications

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

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

Computer Graphics Splines and Curves

Geometric Modeling of Curves

Introduction to Computer Graphics

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

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

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

Intro to Curves Week 1, Lecture 2

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

Bezier Curves, B-Splines, NURBS

Intro to Curves Week 4, Lecture 7

08 - Designing Approximating Curves

A story about Non Uniform Rational B-Splines. E. Shcherbakov

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

Picking and Curves Week 6

Computer Graphics Curves and Surfaces. Matthias Teschner

2D Spline Curves. CS 4620 Lecture 18

The Free-form Surface Modelling System

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.

Dgp _ lecture 2. Curves

Properties of Blending Functions

Modeling 3D Objects: Part 2

Information Coding / Computer Graphics, ISY, LiTH. Splines

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

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

Parametric curves. Brian Curless CSE 457 Spring 2016

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

An introduction to interpolation and splines

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Computergrafik. Matthias Zwicker. Herbst 2010

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

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

Curves. Computer Graphics CSE 167 Lecture 11

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

CS-184: Computer Graphics

2D Spline Curves. CS 4620 Lecture 13

CHAPTER 1 Graphics Systems and Models 3

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

Central issues in modelling

Need for Parametric Equations

Lecture 9: Introduction to Spline Curves

Curve and Surface Basics

GL9: Engineering Communications. GL9: CAD techniques. Curves Surfaces Solids Techniques

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

CS-184: Computer Graphics. Today

TO DUY ANH SHIP CALCULATION

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

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

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

CS452/552; EE465/505. Color Display Issues

Rational Bezier Surface

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

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

Rendering the Teapot 1

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

Interactive Graphics Using Parametric Equations (Day 2)

An introduction to NURBS

Review of Tuesday. ECS 175 Chapter 3: Object Representation

(Refer Slide Time: 00:02:24 min)

Objects 2: Curves & Splines Christian Miller CS Fall 2011

Bezier Curves. An Introduction. Detlef Reimers

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

Surface Modeling. Polygon Tables. Types: Generating models: Polygon Surfaces. Polygon surfaces Curved surfaces Volumes. Interactive Procedural

VALLIAMMAI ENGINEERING COLLEGE

Geometric Modeling Systems

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

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

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

B-spline Curves. Smoother than other curve forms

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.

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

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

ECE 600, Dr. Farag, Summer 09

EECS 487, Fall 2005 Exam 2

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

Computer Graphics Spline and Surfaces

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

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

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

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

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

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

(Spline, Bezier, B-Spline)

Transcription:

BEZIER CURVES 1

OUTLINE Introduce types of curves and surfaces Introduce the types of curves Interpolating Hermite Bezier B-spline Quadratic Bezier Curves Cubic Bezier Curves 2

ESCAPING FLATLAND Until now we have worked with flat entities such as lines and flat polygons Fit well with graphics hardware Mathematically simple But the world is not composed of flat entities Need curves and curved surfaces May only have need at the application level Implementation can render them approximately with flat primitives 3

MODELING WITH CURVES data points approximating curve interpolating data point 4

WHAT MAKES A GOOD REPRESENTATION? There are many ways to represent curves and surfaces Want a representation that is Stable Smooth Easy to evaluate Must we interpolate or can we just come close to data? Do we need derivatives? 5

EXPLICIT REPRESENTATION Most familiar form of curve in 2D y=f(x) Cannot represent all curves Vertical lines Circles Extension to 3D y=f(x), z=g(x) The form z = f(x,y) defines a surface y x y z 6 x

IMPLICIT REPRESENTATION Two dimensional curve(s) g(x,y)=0 Much more robust All lines ax+by+c=0 Circles x 2 +y 2 -r 2 =0 Three dimensions g(x,y,z)=0 defines a surface Intersect two surface to get a curve In general, we cannot solve for points that satisfy the intersection curve 7

PARAMETRIC CURVES Separate equation for each spatial variable x=x(u) y=y(u) z=z(u) For u max u u min we trace out a curve in two or three dimensions p(u) p(u)=[x(u), y(u), z(u)] T p(u min ) p(u max ) 8

SELECTING FUNCTIONS Usually we can select good functions Not unique for a given spatial curve Approximate or interpolate known data Want functions which are easy to evaluate Want functions which are easy to differentiate Computation of normals Connecting pieces (segments) Want functions which are smooth 9

CURVE SEGMENTS In classical numerical methods, we design a single global curve In computer graphics and CAD, it is better to design small connected curve segments p(u) join point p(1) = q(0) p(0) q(u) q(1) 10

WHY POLYNOMIALS Easy to evaluate Continuous and differentiable everywhere Must worry about continuity at join points including continuity of derivatives p(u) q(u) join point p(1) = q(0) but p (1) q (0) 11

INTERPOLATING CURVE p 1 p 3 p 0 p 2 Given four data (control) points p 0, p 1,p 2, p 3 determine cubic p(u) which passes through them Must find c 0,c 1,c 2, c 3 12

OTHER TYPES OF CURVES AND SURFACES How can we get around the limitations of the interpolating form Lack of smoothness Discontinuous derivatives at join points We have four conditions (for cubics) that we can apply to each segment Use them other than for interpolation Need only come close to the data 13

HERMITE FORM p (0) p (1) p(0) p(1) Use two interpolating conditions and two derivative conditions per segment Ensures continuity and first derivative continuity between segments 14

BEZIER S IDEA In graphics and CAD, we do not usually have derivative data Bezier suggested using the same 4 data points as with the cubic interpolating curve to approximate the derivatives in the Hermite form 15

APPROXIMATING DERIVATIVES p 1 located at u=1/3 p 1 p 2 p 2 located at u=2/3 p1 p0 p '(0) 1/ 3 p3 p2 p '(1) 1/ 3 slope p (0) slope p (1) p 0 u p 3 16

QUADRATIC BEZIER CURVES

QUADRATIC BEZIER CURVES

QUADRATIC BEZIER CURVES

ANALYTIC DEFINITION

ANALYTIC DEFINITION

BLENDING FUNCTIONS 3 (1 u) 2 3u(1 u) b(u) 3u 2 (1 u) 3 u 22

CONVEX HULL PROPERTY The properties of the blending functions ensure that all Bezier curves lie in the convex hull of their control points Hence, even though we do not interpolate all the data, we cannot be too far away Bezier curve p 1 p 2 convex hull p 0 p 3 23

ANALYSIS Although the Bezier form is much better than the interpolating form, the derivatives are not continuous at join points Can we do better? Go to higher order Bezier More work Derivative continuity still only approximate 24

CUBIC BEZIER CURVES

ANALYTIC DEFINITION

ANALYTIC DEFINITION

CUBIC BEZIER CURVES

CUBIC BEZIER CURVES

B-SPLINES Basis splines: use the data at p=[p i-2 p i-1 p i p i-1 ] T to define curve only between p i-1 and p i Allows us to apply more continuity conditions to each segment For cubics, we can have continuity of function, first and second derivatives at join points Cost is 3 times as much work for curves Add one new point each time rather than three For surfaces, we do 9 times as much work 30

31 BLENDING FUNCTIONS u u u u u u u u 3 2 2 3 2 3 3 3 3 1 3 6 4 ) (1 6 1 ) b( convex hull property

NURBS Nonuniform Rational B-Spline curves and surfaces add a fourth variable w to x,y,z Can interpret as weight to give more importance to some control data Can also interpret as moving to homogeneous coordinate Requires a perspective division NURBS act correctly for perspective viewing 32

DECASTELJAU RECURSION We can use the convex hull property of Bezier curves to obtain an efficient recursive method that does not require any function evaluations Uses only the values at the control points Based on the idea that any polynomial and any part of a polynomial is a Bezier polynomial for properly chosen control data 33

SPLITTING A CUBIC BEZIER p 0, p 1, p 2, p 3 determine a cubic Bezier polynomial and its convex hull Consider left half l(u) and right half r(u) 34

L(U) AND R(U) Since l(u) and r(u) are Bezier curves, we should be able to find two sets of control points {l 0, l 1, l 2, l 3 } and {r 0, r 1, r 2, r 3 } that determine them 35

CONVEX HULLS {l 0, l 1, l 2, l 3 } and {r 0, r 1, r 2, r 3 }each have a convex hull that that is closer to p(u) than the convex hull of {p 0, p 1, p 2, p 3 } This is known as the variation diminishing property. The polyline from l 0 to l 3 (= r 0 ) to r 3 is an approximation to p(u). Repeating recursively we get better approximations. 36

EXAMPLE These three curves were all generated from the same original data using Bezier recursion by converting all control point data to Bezier control points Bezier Interpolating B Spline 37

SUMMARY Introduce types of curves and surfaces Introduce the types of curves Interpolating Hermite Bezier B-spline Quadratic Bezier Curves Cubic Bezier Curves 38