Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)



Similar documents
Curves and Surfaces. Goals. How do we draw surfaces? How do we specify a surface? How do we approximate a surface?

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

CSE 167: Lecture 13: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Essential Mathematics for Computer Graphics fast

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

Geometric Modelling & Curves

CHAPTER 1 Splines and B-splines an Introduction

Modeling Curves and Surfaces

Figure 2.1: Center of mass of four points.

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

BEZIER CURVES AND SURFACES

H.Calculating Normal Vectors

(Refer Slide Time: 1:42)

Degree Reduction of Interval SB Curves

Dhiren Bhatia Carnegie Mellon University

A Short Introduction to Computer Graphics

Introduction to Computer Graphics

How To Use Design Mentor

Computer Animation: Art, Science and Criticism

NURBS Drawing Week 5, Lecture 10

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

How To Draw A 3D Virtual World In 3D Space (Computer Graphics)

Copyrighted Material. Chapter 1 DEGREE OF A CURVE

Solving Simultaneous Equations and Matrices

NURBS Drawing Week 5, Lecture 10

Parametric Curves. (Com S 477/577 Notes) Yan-Bin Jia. Oct 8, 2015

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the school year.

Biggar High School Mathematics Department. National 5 Learning Intentions & Success Criteria: Assessing My Progress

A matrix method for degree-raising of B-spline curves *

Interactive Computer Graphics

Higher Education Math Placement

Number Sense and Operations

What are the place values to the left of the decimal point and their associated powers of ten?

INTERPOLATION. Interpolation is a process of finding a formula (often a polynomial) whose graph will pass through a given set of points (x, y).

GAME ENGINE DESIGN. A Practical Approach to Real-Time Computer Graphics. ahhb. DAVID H. EBERLY Geometrie Tools, Inc.

Corollary. (f є C n+1 [a,b]). Proof: This follows directly from the preceding theorem using the inequality

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Mean Value Coordinates

A Mathematica Package for CAGD and Computer Graphics

3.3. Solving Polynomial Equations. Introduction. Prerequisites. Learning Outcomes

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

The Essentials of CAGD

Arithmetic and Algebra of Matrices

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

Algebra and Geometry Review (61 topics, no due date)

KEANSBURG SCHOOL DISTRICT KEANSBURG HIGH SCHOOL Mathematics Department. HSPA 10 Curriculum. September 2007

Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

Planar Curve Intersection

INTRODUCTION TO RENDERING TECHNIQUES

Section 1.1. Introduction to R n

Mathematics Course 111: Algebra I Part IV: Vector Spaces

GRADES 7, 8, AND 9 BIG IDEAS

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

HIGH SCHOOL: GEOMETRY (Page 1 of 4)

B4 Computational Geometry

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science. Friday 18 th January 2008.

Finite Element Formulation for Plates - Handout 3 -

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Introduction Week 1, Lecture 1

Estimated Pre Calculus Pacing Timeline

Linear Programming for Optimization. Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc.

FURTHER VECTORS (MEI)

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

Exact Values of the Sine and Cosine Functions in Increments of 3 degrees

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space

with functions, expressions and equations which follow in units 3 and 4.

RELEASED. Student Booklet. Precalculus. Fall 2014 NC Final Exam. Released Items

1. Abstract 2. Introduction 3. Algorithms and Techniques

Georgia Standards of Excellence Curriculum Map. Mathematics. GSE 8 th Grade

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Common Core Unit Summary Grades 6 to 8

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials

Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Lecture Notes, CEng 477

How To Make A Texture Map Work Better On A Computer Graphics Card (Or Mac)

Chapter 13. Curves and Surfaces

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus

Solutions to old Exam 1 problems

Introduction to Computer Graphics Marie-Paule Cani & Estelle Duveau

Machine Learning and Data Mining. Regression Problem. (adapted from) Prof. Alexander Ihler

the points are called control points approximating curve

Prentice Hall Mathematics: Algebra Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

Florida Math for College Readiness

Mathematics (MAT) MAT 061 Basic Euclidean Geometry 3 Hours. MAT 051 Pre-Algebra 4 Hours

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

DEFINITION A complex number is a matrix of the form. x y. , y x

MATH 304 Linear Algebra Lecture 9: Subspaces of vector spaces (continued). Span. Spanning set.

PRE-CALCULUS GRADE 12

The Fourth International DERIVE-TI92/89 Conference Liverpool, U.K., July Derive 5: The Easiest... Just Got Better!

Computer Aided Design (CAD)

Prentice Hall: Middle School Math, Course Correlated to: New York Mathematics Learning Standards (Intermediate)

Curriculum Map by Block Geometry Mapping for Math Block Testing August 20 to August 24 Review concepts from previous grades.

GeoGebra. 10 lessons. Gerrit Stols

Surface Normals and Tangent Planes

COMP-557: Fundamentals of Computer Graphics McGill University, Fall 2010

Transcription:

Computer Graphics CS 54 Lecture 1 (Part 1) Curves Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI)

So Far Dealt with straight lines and flat surfaces Real world objects include curves Need to develop: Representations of curves Tools to render curves

Curve Representation: Explicit One variable expressed in terms of another Example: z f ( x, y) Works if one x value for each y value Example: does not work for a sphere z x y Rarely used in CG because of this limitation

Curve Representation: Implicit Represent D curve or D surface as zeros of a formula Example: sphere representation x y z 1 0 May limit classes of functions used Polynomial: function which can be expressed as linear combination of integer powers of x, y, z Degree of algebraic function: highest power in function Example: mx 4 has degree of 4

Curve Representation: Parametric Represent D curve as functions, 1 parameter D surface as functions, parameters Example: parametric sphere ( x( u), y( u)) ( x( u, v), y( u, v), z( u, v)) x(, ) y(, ) z(, ) cos cos cos sin sin

Choosing Representations Different representation suitable for different applications Implicit representations good for: Computing ray intersection with surface Determing if point is inside/outside a surface Parametric representation good for: Breaking surface into small polygonal elements for rendering Subdivide into smaller patches Sometimes possible to convert one representation into another

Continuity Consider parametric curve P ( u) ( x( u), y( u), z( u)) T We would like smoothest curves possible Mathematically express smoothness as continuity (no jumps) Defn: if kth derivatives exist, and are continuous, curve has kth order parametric continuity denoted C k

Continuity 0 th order means curve is continuous 1 st order means curve tangent vectors vary continuously, etc

Interactive Curve Design Mathematical formula unsuitable for designers Prefer to interactively give sequence of points (control points) Write procedure: Input: sequence of points Output: parametric representation of curve

Interactive Curve Design 1 approach: curves pass through control points (interpolate) Example: Lagrangian Interpolating Polynomial Difficulty with this approach: Polynomials always have wiggles For straight lines wiggling is a problem Our approach: approximate control points (Bezier, B Splines)

De Casteljau Algorithm Consider smooth curve that approximates sequence of control points [p0,p1,.] p( u) up (1 u) p0 1 0 u 1 Blending functions: u and (1 u) are non negative and sum to one

De Casteljau Algorithm Now consider points line segments, P0 to P1 and P1 to P p 01 ( u) (1 u) p0 up1 p11 ( u) (1 u) p1 up

De Casteljau Algorithm Substituting known values of p ( ) and p ( ) 11 u p( u) (1 u) p01 up11( u) 01 u ( 1 u) p0 (u(1 u)) p1 u p b 0( u ) b ( ) 1 u b ( u) Blending functions for degree Bezier curve b 0 ( u) (1 u) b1( u) u(1 u) b u) ( u Note: blending functions, non-negative, sum to 1

De Casteljau Algorithm Extend to 4 control points P0, P1, P, P p ( u) (1 u) p0 (u(1 u) ) p1 (u (1 u)) p u b ( u) b ( u) b ( u 0 1 ) b ( u ) Final result above is Bezier curve of degree

De Casteljau Algorithm p ( u) (1 u) p0 (u(1 u) ) p1 (u (1 u)) p u b ( u) b ( u) b ( u 0 1 ) b ( u ) Blending functions are polynomial functions called Bernstein s polynomials b b b b 0 1 ( u) ( u) ( u) ( u) (1 u) u u u(1 u) (1 u)

De Casteljau Algorithm p ( u) (1 u) p0 (u(1 u) ) p1 (u (1 u)) p u 1 1 Writing coefficient of blending functions gives Pascal s triangle 1 1 1 1 1 1 1 control points 4 control points 1 4 6 4 1 5 control points

De Casteljau Algorithm In general, blending function for k Bezier curve has form k k i i bik ( u) (1 u) u i Example b 0 0 0 0 ( u) (1 u) u (1 u)

De Casteljau Algorithm Can express cubic parametric curve in matrix form 1 0 ],, [1, ) ( p p p p M u u u u p B where 1 1 0 6 0 0 0 0 0 1 M B

Subdividing Bezier Curves OpenGL renders flat objects To render curves, approximate with small linear segments Subdivide surface to polygonal patches Bezier curves useful for elegant, recursive subdivision

Subdividing Bezier Curves Let (P0 P) denote original sequence of control points Recursively interpolate with u = ½ as below Sequences (P00,P01,P0,P0) and (P0,P1,P1,0) define Bezier curves also Bezier Curves can either be straightened or curved recursively in this way

Bezier Surfaces Bezier surfaces: interpolate in two dimensions This called Bilinear interpolation Example: 4 control points, P00, P01, P10, P11, parameters u and v Interpolate between P00 and P01 using u P10 and P11 using u P00 and P10 using v P01 and P11 using v p( u, v) (1 v)((1 u) p00 up01) v((1 u) p10 up11)

Bezier Surfaces Expressing in terms of blending functions p( u, v) b p 01 ( v) b01( u) p00 b01( v) b11b01( u) p01 b11( v) b11( u) 11 Generalizing p( u, v) i0 j0 b i, ( v) b j,( u) p i, j

Problems with Bezier Curves Bezier curves are elegant but too many control points To achieve smoother curve = more control points = higher order polynomial = more calculations Global support problem: All blending functions are non zero for all values of u All control points contribute to all parts of the curve Means after modelling complex surface (e.g. a ship), if one control point is moves, recalculate everything!

B Splines B splines designed to address Bezier shortcomings B Spline given by blending control points Local support: Each spline contributes in limited range Only non zero splines contribute in a given range of u p( u) m i0 B ( u) i p i B-spline blending functions, order

NURBS Encompasses both Bezier curves/surfaces and B splines Non uniform Rational B splines (NURBS) Rational function is ratio of two polynomials Some curves can be expressed as rational functions but not as simple polynomials No known exact polynomial for circle Rational parametrization of unit circle on xy plane: 1 u x( u) 1 u u y( u) 1 u z( u) 0

NURBS We can apply homogeneous coordinates to bring in w Using w, we get we cleanly integrate rational parametrization Useful property of NURBS: preserved under transformation 1 ) ( 0 ) ( ) ( 1 ) ( u w u u z u u y u u x

Tesselation tesselation Far = Less detailed mesh Near = More detailed mesh Simplification Previously: Pre generate mesh versions offline Tesselation shader unit new to GPU in DirectX 10 (007) Subdivide faces to yield finer detail, generate new vertices, primitives Mesh simplification/tesselation on GPU = Real time LoD Tesselation: Demo

Tessellation Shaders Can subdivide curves, surfaces on the GPU

Where Does Tesselation Shader Fit? Fixed number of vertices in/out Can change number of vertices

Step 1: Application Code Tesselation shader can generate new primitive called a patch User defined number of vertices per patch In application, use glpatchparameteri set number of vertices per patch Example: patches, each with 4 vertices 8 vertices total, 4 vertices per patch

Step : Tessellation Control Shader Generates output vertices Sometimes pass through: same no. of vertices as input Set how much each patch should be tessellated Outer: how many segments exterior edges broken into Inner: How many inner regions (horizontal & vertical)

Step : Tessellation Evaluation Shader Positions vertices output from TCS A function e.g. curve equation can be used to position vertices Teapot made up of tessellated patches Eqn to determine tessellated vertex location from control points

Geometry Shader After Tesselation shader. Can Handle whole primitives Generate new primitives Generate no primitives (cull)

References Hill and Kelley, chapter 11 Angel and Shreiner, Interactive Computer Graphics, 6 th edition, Chapter 10 Shreiner, OpenGL Programming Guide, 8 th edition