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

Similar documents
Curves and Surfaces 1

Computer Graphics Curves and Surfaces. Matthias Teschner

B-spline Curves. Smoother than other curve forms

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

2D Spline Curves. CS 4620 Lecture 18

2D Spline Curves. CS 4620 Lecture 13

Central issues in modelling

Curves. Computer Graphics CSE 167 Lecture 11

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

The Free-form Surface Modelling System

08 - Designing Approximating Curves

CS770/870 Spring 2017 Curve Generation

Design considerations

Bezier Curves, B-Splines, NURBS

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

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

Curves and Surfaces Computer Graphics I Lecture 9

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

Rational Bezier Curves

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

Curve and Surface Basics

B-Spline Polynomials. B-Spline Polynomials. Uniform Cubic B-Spline Curves CS 460. Computer Graphics

Information Coding / Computer Graphics, ISY, LiTH. Splines

An introduction to interpolation and splines

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

3D Modeling Parametric Curves & Surfaces

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

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

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

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

Computergrafik. Matthias Zwicker. Herbst 2010

Sung-Eui Yoon ( 윤성의 )

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

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

Splines. Connecting the Dots

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

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

Lecture IV Bézier Curves

Intro to Curves Week 4, Lecture 7

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

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

Lecture 2.2 Cubic Splines

Intro to Curves Week 1, Lecture 2

Curves and Surfaces Computer Graphics I Lecture 10

Properties of Blending Functions

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

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

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

Objects 2: Curves & Splines Christian Miller CS Fall 2011

CS-184: Computer Graphics

A Curve Tutorial for Introductory Computer Graphics

CS-184: Computer Graphics. Today

ECE 600, Dr. Farag, Summer 09

Approximation of 3D-Parametric Functions by Bicubic B-spline Functions

Geometric Modeling of Curves

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

Computer Graphics Lecture 5

Introduction to Computer Graphics

COMP3421. Global Lighting Part 2: Radiosity

Need for Parametric Equations

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Bezier Curves. An Introduction. Detlef Reimers

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.

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

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

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

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

Curves and Surfaces for Computer-Aided Geometric Design

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

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

Derivative. Bernstein polynomials: Jacobs University Visualization and Computer Graphics Lab : ESM4A - Numerical Methods 313

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

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

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

Computer Graphics Splines and Curves

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

Computer Graphics I Lecture 11

Introduction p. 1 What Is Geometric Modeling? p. 1 Computer-aided geometric design Solid modeling Algebraic geometry Computational geometry

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

Splines Computer Graphics I Lecture 10

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

Curves and Surfaces. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd

Curve Construction via Local Fitting

Advanced Graphics. Beziers, B-splines, and NURBS. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Modern Hardware II, Curves. Week 12, Wed Apr 7

8 Project # 2: Bézier curves

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

1. INTRODUCTION ABSTRACT

A MATRIX FORMULATION OF THE CUBIC BÉZIER CURVE

Computer Aided Geometric Design

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

CAGD PACKAGE FOR MATHEMATICA AND ITS USAGE IN THE TEACHING

CHAPTER 1 Graphics Systems and Models 3

End-Term Examination

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

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

Kochanek-Bartels Cubic Splines (TCB Splines)

Parametric curves. Brian Curless CSE 457 Spring 2016

On an approach for cubic Bézier interpolation

Transcription:

Representing Curves Part II Foley & Van Dam, Chapter 11

Representing Curves Polynomial Splines Bezier Curves Cardinal Splines Uniform, non rational B-Splines Drawing Curves Applications of Bezier splines

Bezier Curves Specify indirectly the tangent with two points that are not on the curve

Bezier Curves Easy to enforce C 0 and C 1 continuity. If P j-1, P j and P j+1 are collinear then the curve is G 1 in P j Similar to Cardinal Splines

Bezier Curves No need to supply tangents For each segment curve between P k-1 and P k+2, we have: V(0)=P k-1 V(1)=P k+2 V'(0)=3(P k -P k-1 ) V'(1)=3(P k+2 -P k+1 ) P k P k+1 P k+2 P k-1

Bezier Curves The relation between the Hermite geometry vector and the Bezier geometry vector is: p k 1 0 0 0 p k 1 p 0 0 0 1 p G = = = M G k + 1 k H BH B T k 3 3 0 0 p k + 1 T k + 1 0 0 3 3 p k + 2 Combining with the Hermite interpolation: 3 u k 1 2 u 3 6 3 0 p k V ( u ) = U ( u ) M H M B H G B = u 3 3 0 0 p T 1 3 3 1 k + 1 1 1 0 0 0 p k + 2 p

Bezier Curves 3 T u 1 3 3 1 p k 1 2 u 3 6 3 0 p k V ( u ) = U ( u ) M H M B H G B = u 3 3 0 0 p k + 1 1 1 0 0 0 p k + 2 Blending functions U(u)M H M BH : Bernstein polynomials: n B i ( u ) = u (1 u ) i n i n i with n n! = i ( n i)! i! Note: Assume values between 0 and 1

Bezier Curves Bezier curves produces C 1 continuous curves Linear (convex) combination of 4 basis functions. Alternatively, it is a convex combination of 4 control points Advantage: No need for tangents Curve always contained in the convex hull Disadvantage: Tangent approximation might be imprecise NOTE: The constant 3 is obtained by assuming that V (0)=β(P k -P k-1 ) and V (1)=β(P k+2 -P k+1 ) Then deriving β such that the Bezier curve between P k-1 =(0,0), P k =(1,0), P k+1 =(2,0), P k+2 =(3,0) has constant velocity between P k-1 and P k+2

Cardinal Splines No need to supply tangents For each segment curve between P k and P k+1, we have: V(0)=P k V(1)=P k+1 V'(0)=s(P k+1 -P k-1 ) (s = Tension Parameter) V'(1)=s(P k+2 -P k ) P k P k+1 P k-1 P k+2

Cardinal Splines The relation between the Hermite geometry vector and the Cardinal geometry vector is: p k 0 1 0 0 p k 1 p 0 0 1 0 p G = = = M G k + 1 k H HC C T k s 0 s 0 p k + 1 T k + 1 0 s 0 s p k + 2 Combining with the Hermite interpolation: T s 2 s s 2 s 3 u k 1 2 u 2s s 3 3 2s s p k V ( u) = U ( u) M H M CHGC = u s 0 s 0 p k + 1 1 0 1 0 0 p k + 2 p

Cardinal Splines 1.2 1 0.8 C 1 C 2 0.6 0.4 0.2 0 C 0 C 3-0.2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Cardinal spline blending functions for s=1 1 0.8 0.6 C 1 C 2 0.4 0.2 0-0.2 C 0 C 3-0.4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 V Cardinal spline blending functions for s=2 ( u ) = C 0 ( u ) Pk 1 + C 1 ( u ) Pk + C 2 ( u ) Pk + 1 + C 3 ( u ) Pk + 2

Cardinal Splines Cardinal spline produces C 1 continuous curve Linear combination of 4 basis functions. Alternatively, it is a linear combination of 4 control points Advantage: No need for tangents Disadvantage: Tangent approximation might be imprecise Small tension Big tension

B-Spline Approximation A cubic B-spline (Basis Spline) approximates m 3 points P 0,P 1,,P m with a curve consisting of m-2 cubic polynomial curve segments Q 3, Q 4,,Q m Segment Q i (t) is defined for t [0,1], but with the variable substitution t=t+k we can make the domains of the segments sequential so that Q i (t) is defined for t i t<t i+1 The values of the curve for t i, i 3 are called knots (there are m-1 knots) The segment Q i, i 3 is defined by 4 control points: P i-3, P i-2, P i-1, P i

B-Spline Approximation For Hermite and Bezier curves we have: Define Q ( t) = T M G, t [0,1] T t t t t t t 3 2 i = [( i),( i),( i),1] The B-spline formulation for the segment Q i (t) is: Q () t = T M G i i Bs Bs 1 3 3 1 P i 3 3 2 1 3 6 3 0 P i 2 = [( t ti) ( t ti) ( t ti) 1] 6 3 0 3 0 Pi 1 1 4 1 0 Pi Blending functions Geometry matrix

B-Spline Approximation B-splines are uniform when the knots are spaced at equal intervals of t Uniform B-splines use the same blending function for each Q i (t) Non rational when x(t), y(t) and z(t) are not defined as ratio between two polynomial

B-Spline Approximation Properties: - Changing the control points has a local effect - B-splines are C 0, C 1 and C 2 continuous - The curve is contained in the convex hull defined by the control points - The curve can be closed by repeating the first three control points: P 0, P 1, P 2,, P m, P 0, P 1, P 2 - Little control on where the spline goes (drawback)

Drawing Curves Direct evaluation of the parametric polynomial (Horner s rule) Forward finite differences (explained in class) Recursive subdivision (stop dividing and draw a line when segment is flat)

Applications of Bezier splines A quadratic Bezier curve is defined in terms of three control points: 2 T u 1 2 1 p k 1 V ( u ) = U ( u ) M G = u 2 2 0 p k 1 1 0 0 p k + 1 It is always possible to represent a quadratic Bezier curve with a cubic Bezier curve (just set to zero u 3 coefficient) The inverse is not true: most cubic curves cannot be represented exactly by quadratic curves. Sometimes, not even by series of quadratic curves

Applications of Bezier splines Outlines of Postscript and TrueType characters are defined in terms of Bezier curves Postscript uses cubic forms and TrueType uses quadratic forms Converting TrueType to Postscript is trivial; the opposite can be done only with approximations Control points defining the outline of the letter 'b' of Monotype Arial. On-curve points are indicated with a square and off-curve points with crosses

Applications of Bezier splines This representation can be scaled to arbitrary sizes, rotated, etc.. Finally the outline is rasterized and filled The final quality can be improved with antialiasing When the font size is small, hinting may be necessary to improve symmetry and readability Before hinting After hinting