Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1

Slides:



Advertisements
Similar presentations
SI23 Introduction to Computer Graphics
Advertisements

2002 by Jim X. Chen: Bezier Curve Bezier Curve.
Lecture 10 Curves and Surfaces I
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
© University of Wisconsin, CS559 Spring 2004
Outline for today Inverses of Transforms Curves overview Bézier curves.
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
Slide 127 October 1999CS Computer Graphics (Top Changwatchai) Review of Spline Concepts Sections 10-6 to in Hearn & Baker Splines can be 2D.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
Curves Chiew-Lan Tai.
Curves Chiew-Lan Tai. Curves 2 Reading Required Hearn & Baker, 8-8 – 8-10, 8-12 Foley, 11.2.
09/04/02 Dinesh Manocha, COMP258 Bezier Curves Interpolating curve Polynomial or rational parametrization using Bernstein basis functions Use of control.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 12: Spline Curves (review) Ravi Ramamoorthi Most material.
Modeling of curves Needs a ways of representing curves: Reproducible - the representation should give the same curve every time; Computationally Quick;
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
1 Dr. Scott Schaefer The Bernstein Basis and Bezier Curves.
Cubic Bezier and B-Spline Curves
Computer Graphics (Fall 2008) COMS 4160, Lectures 8,9: Curves Problems
Computer Graphics 12: Spline Representations
Computer Graphics (Fall 2008) COMS 4160, Lecture 3: Transformations 1
Modelling: Curves Week 11, Wed Mar 23
Computer Graphics (Fall 2005) COMS 4160, Lecture 7: Curves 2
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
COEN Computer Graphics I
Designing Parametric Cubic Curves
Computer Graphics (Fall 2004) COMS 4160, Lecture 3: Transformations 1
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Splines III – Bézier Curves
Curve Modeling Bézier Curves
Bresenham’s Algorithm. Line Drawing Reference: Edward Angel’s book: –6 th Ed. Sections 6.8 and 6.9 Assuming: –Clipped (to fall within the window) –2D.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
V. Space Curves Types of curves Explicit Implicit Parametric.
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
Bézier Algorithms & Properties Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, March 3, 2004.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric Curves.
1 CS 430/536 Computer Graphics I Curve Drawing Algorithms Week 4, Lecture 8 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing.
Graphics Graphics Korea University cgvr.korea.ac.kr Parametric Curves 고려대학교 컴퓨터 그래픽스 연구실.
CS 445/645 Fall 2001 Splines/Film/Animation. Final Exam Thursday, December 13 th from 7 – 10 p.m. –Room Olsson 011 You may use one sheet of notes (8.5.
Geometric Modelling 2 INFO410 & INFO350 S Jack Pinches
Keyframing and Splines Jehee Lee Seoul National University.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Curves: ch 4 of McConnell General problem with constructing curves: how to create curves that are “smooth” CAD problem Curves could be composed of segments.
Review CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2005.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
Computer Graphics (Fall 2003) COMS 4160, Lecture 10: Curves 1 Ravi Ramamoorthi
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
CS 450: Computer Graphics PARAMETRIC SPLINES AND SURFACES
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 12: Curves 1
Rendering Bezier Curves (1) Evaluate the curve at a fixed set of parameter values and join the points with straight lines Advantage: Very simple Disadvantages:
CS559: Computer Graphics Lecture 33: Shape Modeling Li Zhang Spring 2008.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
CS552: Computer Graphics Lecture 19: Bezier Curves.
Piecewise Polynomial Parametric Curves Sun-Jeong Kim.
Introduction to Parametric Curve and Surface Modeling.
CS5500 Computer Graphics May 11, 2006
Parametric Curves cgvr.korea.ac.kr.
CSE 167 [Win 17], Lecture 10: Curves 2 Ravi Ramamoorthi
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
Parametric Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
The Bernstein Basis and Bezier Curves
Implicit Functions Some surfaces can be represented as the vanishing points of functions (defined over 3D space) Places where a function f(x,y,z)=0 Some.
UNIT-5 Curves and Surfaces.
Lecture 21: B Spline Curve
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1

Course Outline  3D Graphics Pipeline Rendering (Creating, shading images from geometry, lighting, materials) Modeling (Creating 3D Geometry)

Course Outline  3D Graphics Pipeline Rendering (Creating, shading images from geometry, lighting, materials) Modeling (Creating 3D Geometry) Unit 1: Transformations Weeks 1,2. Ass 1 due Feb 14 Unit 2: Spline Curves Modeling geometric objects Weeks 3,4 hw2.exehw2.exe Ass 2 due Feb 26 (demo)

Motivation  How do we model complex shapes?  In this course, only 2D curves, but can be used to create interesting 3D shapes by surface of revolution, lofting etc  Techniques known as spline curves  This unit is about mathematics required to draw these spline curves, as in HW 2  History: From using computer modeling to define car bodies in auto-manufacturing. Pioneers are Pierre Bezier (Renault), de Casteljau (Citroen)

Outline of Unit  Bezier curves  deCasteljau algorithm, explicit form, matrix form  Polar form labeling (next time)  B-spline curves (next time)  Not well covered in textbooks (especially as taught here). Main reference will be lecture notes. If you do want a printed ref, handouts from CAGD, Seidel

Bezier Curve (with HW2 demo)  Motivation: Draw a smooth intuitive curve (or surface) given a few key user-specified control points hw2.exe Control points (all that user specifies, edits) Smooth Bezier curve (drawn automatically) Control polygon

Bezier Curve: (Desirable) properties  Interpolates, is tangent to end points  Curve within convex hull of control polygon Control points (all that user specifies, edits) Smooth Bezier curve (drawn automatically) Control polygon hw2.exe

Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve?  Algorithmic: deCasteljau algorithm  Explicit: Bernstein-Bezier polynomial basis  4x4 matrix for cubics  Properties: Advantages and Disadvantages

deCasteljau: Linear Bezier Curve  Just a simple linear combination or interpolation (easy to code up, very numerically stable) Linear (Degree 1, Order 2) F(0) = P0, F(1) = P1 F(u) = ? P0 P1 P0P1 1-uu F(u) = (1-u) P0 + u P1 F(0) F(u) F(1)

deCasteljau: Quadratic Bezier Curve P0 P1 P2 Quadratic Degree 2, Order 3 F(0) = P0, F(1) = P2 F(u) = ? F(u) = (1-u) 2 P0 + 2u(1-u) P1 + u 2 P2 P0P1P2 1-u u u u

Geometric interpretation: Quadratic u u u 1-u

Geometric Interpretation: Cubic u u u u u u

deCasteljau: Cubic Bezier Curve P0 P1P2 P3 Cubic Degree 3, Order 4 F(0) = P0, F(1) = P3 P0P1P2P3 1-u u u uu u u F(u) = (1-u) 3 P0 +3u(1-u) 2 P1 +3u 2 (1-u) P2 + u 3 P3 1-u

Summary: deCasteljau Algorithm Linear Degree 1, Order 2 F(0) = P0, F(1) = P1 P0 P1 P0P1 1-uu F(u) = (1-u) P0 + u P1 P0 P1 P2 Quadratic Degree 2, Order 3 F(0) = P0, F(1) = P2 P0P1P2 F(u) = (1-u) 2 P0 + 2u(1-u) P1 + u 2 P2 1-u u u u P0 P1P2 P3 Cubic Degree 3, Order 4 F(0) = P0, F(1) = P3 P0P1P2P3 1-u u u uu u u F(u) = (1-u) 3 P0 +3u(1-u) 2 P1 +3u 2 (1-u) P2 + u 3 P3 1-u

DeCasteljau Implementation  Can be optimized to do without auxiliary storage

Summary of HW2 Implementation Bezier (Bezier2 and Bspline discussed next time)  Arbitrary degree curve (number of control points)  Break curve into detail segments. Line segments for these  Evaluate curve at locations 0, 1/detail, 2/detail, …, 1  Evaluation done using deCasteljau  Key implementation: deCasteljau for arbitrary degree  Is anyone confused? About handling arbitrary degree?  Can also use alternative formula if you want  Explicit Bernstein-Bezier polynomial form (next)  Questions?

Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve?  Algorithmic: deCasteljau algorithm  Explicit: Bernstein-Bezier polynomial basis  4x4 matrix for cubics  Properties: Advantages and Disadvantages

Recap formulae  Linear combination of basis functions  Explicit form for basis functions? Guess it?

Recap formulae  Linear combination of basis functions  Explicit form for basis functions? Guess it?  Binomial coefficients in [(1-u)+u] n

Summary of Explicit Form

Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve?  Algorithmic: deCasteljau algorithm  Explicit: Bernstein-Bezier polynomial basis  4x4 matrix for cubics  Properties: Advantages and Disadvantages

Cubic 4x4 Matrix (derive)

Issues for Bezier Curves Main question: Given control points and constraints (interpolation, tangent), how to construct curve?  Algorithmic: deCasteljau algorithm  Explicit: Bernstein-Bezier polynomial basis  4x4 matrix for cubics  Properties: Advantages and Disadvantages

Properties (brief discussion)  Demo:  Interpolation: End-points, but approximates others  Single piece, moving one point affects whole curve (no local control as in B-splines later)  Invariant to translations, rotations, scales etc. That is, translating all control points translates entire curve  Easily subdivided into parts for drawing (next lecture): Hence, Bezier curves easiest for drawing hw2.exe