Computer Graphics (Fall 2005) COMS 4160, Lecture 7: Curves 2

Slides:



Advertisements
Similar presentations
Interpolating curves.
Advertisements

Lecture Notes #11 Curves and Surfaces II
Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
© University of Wisconsin, CS559 Spring 2004
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 13: NURBs, Spline Surfaces Ravi Ramamoorthi Some material.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 7: Quadric Error Metrics Ravi Ramamoorthi
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
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
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 11: Curves Problems
1 Outline What is polar form? B-Spline –Labeling, why (0,1,2), (1,2,3)… ? –Knot Vector, why (-2,-1,0,1,2,…) ? Derivation of B-Spline points –Maybe(!?)
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.
Cubic Bezier and B-Spline Curves
Curves Mortenson Chapter 2-5 and Angel Chapter 9
Computer Graphics (Fall 2008) COMS 4160, Lectures 8,9: Curves Problems
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Modelling: Curves Week 11, Wed Mar 23
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Curves Week 13, Mon 24 Nov 2003.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
COEN Computer Graphics I
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
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.
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.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
This Week Week Topic Week 1 Week 2 Week 3 Week 4 Week 5
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
Curves.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Parametric Curves.
Graphics Graphics Korea University cgvr.korea.ac.kr Parametric Curves 고려대학교 컴퓨터 그래픽스 연구실.
Curves and Surfaces Chapter 10. CS 480/680 2Chapter 9 -- Hierarchical Models Introduction: Introduction: Until now we have worked with flat entities such.
Splines IV – B-spline Curves based on: Michael Gleicher: Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
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.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
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
11/26/02(C) University of Wisconsin Last Time BSplines.
(c) 2002 University of Wisconsin
Slide 129 October 1999CS Computer Graphics (Top Changwatchai) Bézier Curves - Results of Derivation Tangents at endpoints are equal to endpoint slopes.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
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:
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Lecture 13 of 42 Wednesday, 15 February 2006 William.
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.
Piecewise Polynomial Parametric Curves Sun-Jeong Kim.
Introduction to Parametric Curve and Surface Modeling.
© University of Wisconsin, CS559 Spring 2004
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
CSE 167 [Win 17], Lecture 9: Curves 1 Ravi Ramamoorthi
Parametric Curves.
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Lecture 21: B Spline Curve
Introduction to Parametric Curve and Surface Modeling
Presentation transcript:

Computer Graphics (Fall 2005) COMS 4160, Lecture 7: Curves 2

To Do  Start on HW 2 (cannot be done at last moment) This (and previous) lecture should have all information need  Start thinking about partners for HW 3 and HW 4  Remember though, that HW2 is done individually  Your submission of HW 2 must include partner for HW 3

Outline of Unit  Bezier curves (last time)  deCasteljau algorithm, explicit, matrix (last time)  Polar form labeling (blossoms)  B-spline curves  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

Idea of Blossoms/Polar Forms  (Optional) Labeling trick for control points and intermediate deCasteljau points that makes thing intuitive  E.g. quadratic Bezier curve F(u)  Define auxiliary function f(u 1,u 2 ) [number of args = degree]  Points on curve simply have u 1 =u 2 so that F(u) = f(u,u)  And we can label control points and deCasteljau points not on curve with appropriate values of (u 1,u 2 ) f(0,0) = F(0)f(1,1) = F(1) f(0,1)=f(1,0) f(u,u) = F(u)

Idea of Blossoms/Polar Forms  Points on curve simply have u 1 =u 2 so that F(u) = f(u,u)  f is symmetric f(0,1) = f(1,0)  Only interpolate linearly between points with one arg different  f(0,u) = (1-u) f(0,0) + u f(0,1) Here, interpolate f(0,0) and f(0,1)=f(1,0) F(u) = f(uu) = (1-u) 2 P0 + 2u(1-u) P1 + u 2 P2 1-u u u u 0u1u uu f(0,0) = F(0)f(1,1) = F(1) f(0,1)=f(1,0) f(u,u) = F(u)

Geometric interpretation: Quadratic u u u 1-u 00 01= u 1u uu

Polar Forms: Cubic Bezier Curve uuuu 00u 01u 11u 1-uuu 0uu1uu 1-u u uuu

Geometric Interpretation: Cubic 00u 0u1 u11 0uu uu1 uuu

Why Polar Forms?  Simple mnemonic: which points to interpolate and how in deCasteljau algorithm  Easy to see how to subdivide Bezier curve (next) which is useful for drawing recursively  Generalizes to arbitrary spline curves (just label control points correctly instead of for Bezier)  Easy for many analyses (beyond scope of course)

Subdividing Bezier Curves Drawing: Subdivide into halves (u = ½) Demo: hw2.exehw2.exe  Recursively draw each piece  At some tolerance, draw control polygon  Trivial for Bezier curves (from deCasteljau algorithm): hence widely used for drawing Why specific labels/ control points on left/right?  How do they follow from deCasteljau? u 0uu uuu uuu uu1 u11 111

Geometrically 00½ 0½10½1 ½11 0½½ ½½1 ½½½

Geometrically 00½ 0½10½1 ½11 0½½ ½½1 ½½½

Subdivision in deCasteljau diagram uuuu 00u 01u 11u 1-uuu 0uu1uu 1-u u uuu Left part of Bezier curve (000, 00u, 0uu, uuu) Always left edge of deCasteljau pyramid Right part of Bezier curve (uuu, 1uu, 11u, 111) Always right edge of deCasteljau pyramid These (interior) points don’t appear in subdivided curves at all

Summary for HW 2  Bezier2 (Bezier discussed last time)  Given arbitrary degree Bezier curve, recursively subdivide for some levels, then draw control polygon hw2.exe hw2.exe  Generate deCasteljau diagram; recursively call a routine with left edge and right edge of this diagram  You are given some code structure; you essentially just need to compute appropriate control points for left, right

DeCasteljau: Recursive Subdivision  DeCasteljau (from last lecture) for midpoint  Followed by recursive calls using left, right parts

Outline of Unit  Bezier curves (last time)  deCasteljau algorithm, explicit, matrix (last time)  Polar form labeling (blossoms)  B-spline curves  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: Disadvantages  Single piece, no local control (move a control point, whole curve changes) hw2.exehw2.exe  Complex shapes: can be very high degree, difficult  In practice, combine many Bezier curve segments  But only position continuous at join since Bezier curves interpolate end-points (which match at segment boundaries)  Unpleasant derivative (slope) discontinuities at end-points  Can you see why this is an issue?

B-Splines  Cubic B-splines have C 2 continuity, local control  4 segments / control point, 4 control points/segment  Knots where two segments join: Knotvector  Knotvector uniform/non-uniform (we only consider uniform cubic B-splines, not general NURBS) Knot: C 2 continuity deBoor points Demo: hw2.exehw2.exe

Polar Forms: Cubic Bspline Curve -2 –1 0 –  Labeling little different from in Bezier curve  No interpolation of end-points like in Bezier  Advantage of polar forms: easy to generalize Uniform knot vector: -2, -1, 0, 1, 2,3 Labels correspond to this

deCasteljau: Cubic B-Splines  Easy to generalize using polar-form labels  Impossible remember without -2 –1 0 – u 0 1 u 1 2 u ? ? ? ? ? ?

deCasteljau: Cubic B-Splines  Easy to generalize using polar-form labels  Impossible remember without -2 –1 0 – u 0 1 u 1 2 u 1-u/3 (1-u)/3 (2+u)/3 (2-u)/3 (1+u)/3 u/3 0 u u 1 u u ? ? ? ?

deCasteljau: Cubic B-Splines  Easy to generalize using polar-form labels  Impossible remember without -2 –1 0 – u 0 1 u 1 2 u 1-u/3 (1-u)/3 (2+u)/3 (2-u)/3 (1+u)/3 u/3 0 u u 1 u u (1-u)/2 (1+u)/2 1-u/2 u/2 u u u 1-u u

Explicit Formula (derive as exercise) u 0 1 u 1 2 u 1-u/3 (1-u)/3 (2+u)/3 (2-u)/3 (1+u)/3 u/3 0 u u 1 u u (1-u)/2 (1+u)/2 1-u/2 u/2 u u u 1-u u P0 P1 P2 P3

Summary of HW 2  BSpline Demo hw2.exehw2.exe  Arbitrary number of control points / segments  Do nothing till 4 control points (see demo)  Number of segments = # cpts – 3  Segment A will have control pts A,A+1,A+2,A+3  Evaluate Bspline for each segment using 4 control points (at some number of locations, connect lines)  Use either deCasteljau algorithm (like Bezier) or explicit form [matrix formula on previous slide]  Questions?