CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi

Slides:



Advertisements
Similar presentations
SI23 Introduction to Computer Graphics
Advertisements

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
Lecture 10 Curves and Surfaces I
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material.
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Cubic Curves CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
Outline for today Inverses of Transforms Curves overview Bézier curves.
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
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.
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
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
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.
Parametric Surfaces Define points on the surface in terms of two parameters Simplest case: bilinear interpolation s t s x(s,t)x(s,t) P 0,0 P 1,0 P 1,1.
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
(c) 2002 University of Wisconsin
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.
CSE 167 [Win 17], Lecture 3: Transformations 1 Ravi Ramamoorthi
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 11: Curves Problems 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:

CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi Computer Graphics CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi http://viscomp.ucsd.edu/classes/cse167/wi17

Course Outline 3D Graphics Pipeline Modeling Animation Rendering

Graphics Pipeline In HW 1, HW 2, draw, shade objects But how to define geometry of objects? How to define, edit shape of teapot? We discuss modeling with spline curves Demo of HW 3 solution Homework submission (Feb 29) After midterm, but please start on it before Not on edX edge, http://52.42.39.203/cs167hw3/ Same password as for readings (and code grade only)

Curves for Modeling Rachel Shiner, Final Project Spring 2010

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 3 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 few key user-specified control points Demo HW 3 Control points (all that user specifies, edits) Control polygon Smooth Bezier curve (drawn automatically)

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

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) P1 F(1) Linear (Degree 1, Order 2) F(0) = P0, F(1) = P1 F(u) = ? F(u) P0 P0 P1 1-u u F(u) = (1-u) P0 + u P1 F(0)

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

Geometric interpretation: Quadratic

Geometric Interpretation: Cubic

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

Summary: deCasteljau Algorithm P1 P1 P2 P1 P0 P2 P0 P3 P0 Linear Degree 1, Order 2 F(0) = P0, F(1) = P1 Quadratic Degree 2, Order 3 F(0) = P0, F(1) = P2 Cubic Degree 3, Order 4 F(0) = P0, F(1) = P3 P0 P1 P2 F(u) = (1-u)2 P0 + 2u(1-u) P1 + u2 P2 1-u u P0 P1 P2 P3 P0 P1 1-u u F(u) = (1-u) P0 + u P1 1-u u 1-u u 1-u u 1-u u 1-u u 1-u u F(u) = (1-u)3 P0 +3u(1-u)2 P1 +3u2(1-u) P2 + u3 P3

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)

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 of HW 3 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