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

Similar documents
ECE 600, Dr. Farag, Summer 09

Lecture IV Bézier Curves

Central issues in modelling

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

Computer Graphics Curves and Surfaces. Matthias Teschner

Design considerations

8 Project # 2: Bézier curves

2D Spline Curves. CS 4620 Lecture 13

Sung-Eui Yoon ( 윤성의 )

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

2D Spline Curves. CS 4620 Lecture 18

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

Curve and Surface Basics

Parameterization. Michael S. Floater. November 10, 2011

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

Properties of Blending Functions

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

08 - Designing Approximating Curves

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

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

Curves, Surfaces and Recursive Subdivision

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

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

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

3D Modeling Parametric Curves & Surfaces

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

COMPUTER AIDED GEOMETRIC DESIGN. Thomas W. Sederberg

INF3320 Computer Graphics and Discrete Geometry

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

Computer Graphics Splines and Curves

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

Parameterization of triangular meshes

Intro to Curves Week 1, Lecture 2

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

Intro to Modeling Modeling in 3D

Curves and Surfaces for Computer-Aided Geometric Design

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

Curves. Computer Graphics CSE 167 Lecture 11

(Spline, Bezier, B-Spline)

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

Curves and Surfaces Computer Graphics I Lecture 9

Computergrafik. Matthias Zwicker. Herbst 2010

Information Coding / Computer Graphics, ISY, LiTH. Splines

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

Lecture 9: Introduction to Spline Curves

A Practical Review of Uniform B-Splines

Bezier Curves. An Introduction. Detlef Reimers

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

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

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

Curves and Surfaces 1

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

An introduction to interpolation and splines

The Essentials of CAGD

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Freeform Curves on Spheres of Arbitrary Dimension

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

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

CS3621 Midterm Solution (Fall 2005) 150 points

09 - Designing Surfaces. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo

Physically-Based Modeling and Animation. University of Missouri at Columbia

B-spline Curves. Smoother than other curve forms

Computer Graphics I. Midterm Examination. October 23, This is a closed-book exam; only one double-sided sheet of notes is permitted.

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

Bezier Curves, B-Splines, NURBS

OUTLINE. Quadratic Bezier Curves Cubic Bezier Curves

PS Geometric Modeling Homework Assignment Sheet I (Due 20-Oct-2017)

Objects 2: Curves & Splines Christian Miller CS Fall 2011

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

Introduction to Geometry. Computer Graphics CMU /15-662

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

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

2D Object Definition (1/3)

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

Curves and Surfaces Computer Graphics I Lecture 10

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

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

Intro to Curves Week 4, Lecture 7

Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives. Directional Derivatives

Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers. Lagrange Multipliers

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

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

Subdivision curves and surfaces. Brian Curless CSE 557 Fall 2015

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

Three-Dimensional Coordinate Systems

American International Journal of Research in Science, Technology, Engineering & Mathematics

A Flavor of Topology. Shireen Elhabian and Aly A. Farag University of Louisville January 2010

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

Measuring Lengths The First Fundamental Form

GEOMETRIC TOOLS FOR COMPUTER GRAPHICS

Splines. Connecting the Dots

The convex hull of a set Q of points is the smallest convex polygon P for which each point in Q is either on the boundary of P or in its interior.

Computer Graphics I Lecture 11

Final Exam CS 184: Foundations of Computer Graphics! page 1 of 12!

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

Advanced Modeling 2. Katja Bühler, Andrej Varchola, Eduard Gröller. March 24, x(t) z(t)

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

Surfaces and Partial Derivatives

Generalized barycentric coordinates

MATH 2023 Multivariable Calculus

Transcription:

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

A smile is a curve that sets everything straight Phyllis Diller (American comedienne and actress, born 1917)

Outline Introduction Affine transformations Curves What is a curve? Affine invariance Convex Hull Lagrange Interpolation Bezier Curves Surfaces

Introduction We will discuss some of the existing curves associated with their interpolation techniques. We will start with few of the important properties which we desire for curves e.g. continuity and affine invariance. We will introduce transformations for manipulating curves and then proceed to discuss some of the most popular curves used in computer graphics. But let s first introduce the notion of parametric curves which will be later extended to define parametric surfaces.

Points in space

A point, which can be defined as follows:

Line Segment

t = x A line segment can be defined by its ending points. x(t)=(1-t) x +t x 1 Many ways to define the equation of a line. Think about it as a road, we will end up with the parametric form of the line. t = 1 x 1

Affine Transformations

What is a transform? Recall

Scaling

Scaling in 2D Scaling a coordinate means multiplying each of its components by a scalar Uniform scaling means this scalar is the same for all components: 2

Scaling in 2D Non-uniform scaling: different scalars per component: X 2, Y.5 How can we represent this in matrix form?

Scaling in 2D Scaling operation: Or, in matrix form: û ù ë é = û ù ë é by ax y x ' ' û ù ë é û ù ë é = û ù ë é y x b a y x ' ' scaling matrix

Scaling in 3D û ù ë é û ù ë é = û ù ë é 1 1 1 ' ' ' z y x s s s z y x z y x z x y

Translation

Translation in 2D x' = y' = x + t x y + t y t x = 2 t y = 1

Translation in 3D û ù ë é û ù ë é = û ù ë é 1 1 1 1 1 1 ' ' ' z y x t t t z y x z y x (x,y,z ) (x,y,z) T=(t x,t y,t z ) z x y

Rotation

Rotation in 2D (x, y ) x = x cos(q) - y sin(q) y = x sin(q) + y cos(q) (x, y) Or, in matrix form q é ë x y ' ù ' û = écosq - sin ësinq cos q q ùé ûë x y ù û

Rotation in 3D How should we specify rotations? In 2D, it was always counterclockwise in the xy-plane. In 3D, we have more choices xz-plane, yz-plane, an arbitrary plane. We could specify these in terms of the vector perpendicular to the plane of rotation. z axis, y-axis, x-axis, arbitrary axis

Rotation in 3D Euler Angles û ù ë é û ù ë é - = û ù ë é 1 1 1 cos sin sin cos 1 ' ' ' z y x z y x g g g g û ù ë é û ù ë é - = û ù ë é 1 1 cos sin 1 sin cos 1 ' ' ' z y x z y x b b b b û ù ë é û ù ë é - = û ù ë é 1 1 cos sin sin cos 1 1 ' ' ' z y x z y x a a a a z x y z x y z x y

Curves

What are they?

Example Space Curves z x 2 + y 2 + z 2 = 1 y - ½ = The intersection is a circle (space curve) 1 y x

Parametric Curves

Parametric Curves Some restrictions should be placed on the continuous functions defining the curve in order not to fill the space, however there are still some parametric curves that are space filling, e.g. the Peano curve. Peano curve - Peano curve - 1 Peano curve - 2 In 188 the Italian logician Giuseppe Peano (1858-1932) constructed the Peano curve, a base motif fractal which uses a line segment as base. The motif is dividing the line segment in three parts, and making a square up and down the middle part. This leads to a filled square, so the curve is a space-filling curve.

Affine Invariance Proof left as homework L

Convex Hull

Convex set Non-convex set Another useful property is that if a curve lies within its convex hull which can be defined as follows: x y x y

Given a set of pins on a pin board and a rubber band around them. How does the rubber band look when it snaps tight? We represent the convex hull as the sequence of points on the convex hull polygon, in counter-clockwise order.

Interpolation

In numerical analysis, interpolation is a method of constructing new points within the range of a discrete set of known points. From the engineering point of view, we often has a number of points, obtained by sampling or experimentation, and we wish to construct a function which closely fits these points, this is called curve fitting where interpolation is a special case, in which the function must go exactly through the known points. Another way to define interpolation is from its linguistic meaning, inter means between and pole means points or nodes, hence any method of calculating a new point between two or more known points is called interpolation.

n-degree Interpolation

Lagrange Interpolation Joseph-Louis Lagrange, Italian-born mathematician and astronomer, who lived most of his life in Prussia and France, making significant contributions to all fields of analysis, to number theory, and to classical and celestial mechanics.

Example: Uniform Lagrange Interpolation

L 3 L 3 1 L 3 2 L 3 3 1.5 1 L 3 k.5 -.5.5 1 1.5 2 2.5 3 t Basis functions for uniform Lagrange interpolation of degree 3.

4 3 x 1, t = t 1 = 1 Convex hull of the curve x 3 2 t = t 3 = 3 y 1 x t = t = -1 Convex hull of the control points t = t 2 = 2-2 1 2 3 4 5 x Uniform Lagrange interpolation of four points, control points are shown in read, the convex hull of the control points is shown in dashed-red line while the convex hull of the generated curve (shown in dashed-blue) is much larger than the convex hull of the control points, hence Lagrange curve does not satisfy the convex hull property. x 2

In Matlab

Next However Lagrange interpolation does not satisfy the convex hull property. Typically, we would like the curve to be more confined, i.e. the area of the convex hull of the curve should not be much greater than the area of the convex hull of the control points. Next we will discuss some of the more popular curves and how they may be used to interpolate points.

Bézier Curves Bézier curves are one of the most popular representations for curves. Pierre Étienne Bézier (September 1, 191 November 25, 1999) was a French engineer and patentor (but not the inventor) of the Bézier curves and Bézier surfaces that are now used in most computer-aided design and computer graphics systems.

The t in the function for a linear Bézier curve can be thought of as describing how far x(t) is from P to P 1. For example when t=.25, x(t) is one quarter of the way from point P to P 1. As t varies from to 1, x(t) describes a curved line from P to P 1.

For quadratic Bézier curves one can construct intermediate points Q and Q 1 such that as t varies from to 1: Point Q varies from P to P 1 and describes a linear Bézier curve. Point Q 1 varies from P 1 to P 2 and describes a linear Bézier curve. Point x(t) varies from Q to Q 1 and describes a quadratic Bézier curve.

For higher-order curves one needs correspondingly more intermediate points. For cubic curves one can construct intermediate points Q, Q1 & Q2 that describe linear Bézier curves, and points R & R1 that describe quadratic Bézier curves. For fourth-order curves one can construct intermediate points Q, Q1, Q2 & Q3 that describe linear Bézier curves, points R, R1 & R2 that describe quadratic Bézier curves, and points S & S1 that describe cubic Bézier curves.

Bernstein Polynomials Properties Proof left as homework L

Example The most popular Bézier curves are Bézier curves of degree 3. Let the control points be given as follows:

B 3 B 3 1 B 3 2 B 3 3 1.8.6 B 3 k.4.2.2.4.6.8 1 t Basis functions for Bézier curves of degree 3.

The curve will be defined by; 4 3 x 1 Convex hull of the curve 2 x 3 y 1 x -1 Convex hull of the control points x 2-2 1 2 3 4 5 x Bézier curve of four points and its convex hull, control points are shown in read, the convex hull of the control points is shown in dashed-red line while the convex hull of the generated curve (shown in dashed-blue) is inside the convex hull of the control points, hence Bézier curve satisfy the convex hull property.

In Matlab

Derivatives of Bézier Curves Thus we have immediate form of the derivative at the end points. These are the tangents to the curve at the end points. This will be useful in defining curves that are piecewise continuous. Homework L Differentiate Bézier curve and prove Theorem 4

Piecewise Continuous Bézier Curves

We can construct Bézier curves of arbitrary degree, however it becomes more difficult to control the curves since the Bézier curve is only guaranteed to interpolate end points. Instead we can create several Bézier segments that are piecewise continuous. There are different kinds of continuity which can be considered.

Recall

Example

B 3,1 B 3 1,1 B 3 2,1 B 3 3,1 1 5 B 3 k,1-5 -1-15.2.4.6.8 1 t

B 3,2 B 3 1,2 B 3 2,2 B 3 3,2 1 5 B 3 k,2-5 -1-15.2.4.6.8 1 t

1.5 1.5 y -.5-1 -.5.5 1 1.5 2 2.5 x Piecewise Bézier curve with two pieces, control points are shown in red, the generate curve is shown in blue

In Matlab

In Matlab

Bézier Curves Rendering

de Casteljau's Method

x 2 1 x 2 2 x 2 3 x 2 x 3 1 x 3 2 x 3 x 1 2 x 1 1 x 1 4 x 1 3 x 1 5 x = x( t 4 x 3 x 2 x ) t =.2 x 4 1 x 4 1 x x x 5

Recursive Subdivision Although de Casteljau's method can be numerically stable, we still do not know how many points the Bézier curve needs to be evaluated to obtain acceptable results. Next we will discuss how Bézier curves can be subdivided until a desired level of accuracy is obtained.

x 2 1 x 2 2 x 2 3 x 2 x 3 1 x 3 2 x 3 x 1 2 x 1 1 x 1 4 x 1 3 x 1 5 x = x( t 4 x 3 x 2 x 1 x x ) Control points of Control points of t =.2 x 2 ( t) x 1 ( t) x 5 x 4 1 x 4

Rational Bézier Curves

x 1 w 1 = (2,1) = 1 3 x w 2 2 = (2,-1) = 1 3 x w = (,1) = 1 x 3 w 3 = (,-1) = 1 Section of a circle, drawn with a rational Bézier curve

Surfaces

Tensor Product Surfaces

Tensor Product Bézier Surfaces

Piecewise Continuous Bézier Surfaces Using the normals, we can define piece-wise continuous Bézier surfaces, where de Casteljau s algorithm can be applied to efficiently render these surfaces. (refer to the reading material)

Triangular Bézier Surfaces Instead of arranging the initial configuration of the control points in a rectangular fashion as with tensor product Bézier surfaces, we can arrange the control points in a triangle (see the following figure). If the degree of the Bézier surface is n, then there are n+1 control points on each side.

x 3 x 21 x 21 x 12 x 111 x 12 x 3 x12 x21 x 3

The Bézier triangles are affine invariant, the surface interpolates the three corner control points and the surface lies within the convex hull of the control points.

Rational Bézier Surfaces

Subdivision Surfaces We saw before how to subdivide a Bézier curve using de Casteljau s method. With sufficient subdivision, the Bézier curve segments can be approximated by lines. If we proceed to subdivide an infinite number of times, the limit curve is the Bézier curve. However, this is not the only way to subdivide a curve, we can recursively introduce new control points as a function of the given control points to produce smoother curves, different subdivision methods apply different subdivision rules, i.e. how to obtain new points in terms of the points at the current iteration. In the same way that curves can be recursively subdivided, we can subdivide a surface control mesh. The tensor product Bézier surface can be modeled in this manner, but subdivision is not limited to rectangular meshes, triangular ones can also be subdivided.

Loop Subdivision Loop s subdivision scheme works on triangular meshes. The surface is an approximating surface, that is it doesn t interpolate (passes through) its control points. A new vertex is added for each edge, at each subdivision step.

k y n k y 1 Current vertex/point Neighborhood/valence of the current point y k i+ 1 k x k y i k y 3 k y 2 i-th neighbor

k y n k y 1 k x k y 2 Current vertex/point k +1 x i k y 3 y k i+ 1 k y i New vertex introduced on the edges connecting neighboring vertices A new vertex introduced at the edge connecting to the i-th neighbor i-th neighbor

k y n b k y 1 b Vertex Mask k x 1- nb b k y 2 Current vertex/point y b k i+ 1 b k y i b k y 3

k y n k y 1 Edge Mask k x 3/8 k y 2 Current vertex/point 1/8 k +1 x i 3/8 1/8 y k i-1 y k i+ 1 k y i A new vertex introduced at the edge connecting to the i-th neighbor i-th neighbor

½ ½ 1/8 6/8 1/8 Edge mask Vertex mask

Thank You!!!