Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 30 of 42 Wednesday, 09.

Slides:



Advertisements
Similar presentations
Lecture Notes #11 Curves and Surfaces II
Advertisements

© University of Wisconsin, CS559 Spring 2004
#8: Curves and Curved Surfaces CSE167: Computer Graphics Instructor: Ronen Barzel UCSD, Winter 2006.
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
CS 445/645 Fall 2001 Hermite and Bézier Splines. Specifying Curves Control Points –A set of points that influence the curve’s shape Knots –Control points.
© University of Wisconsin, CS559 Spring 2004
Jehee Lee Seoul National University
B-Spline Blending Functions
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Q about GL to render polygon glBegin(GL_TRIANGLES) glVertex3f(0,0,0); glVertex3f(1,1,0); glVertex3f(1,0,0); glVertex3f(0,1,0); glEnd();
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
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
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 12: Spline Curves (review) Ravi Ramamoorthi Most material.
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
1 Lecture 13 Modeling Curved Lines and Surfaces. 2 Types of Surfaces Ruled Surfaces B-Splines and Bezier Curves Surfaces of Revolution.
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
Parametric Curves & Surfaces
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.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 6 of 41 William H. Hsu Department of Computing.
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.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 21 of 41 William H. Hsu Department of Computing.
This Week Week Topic Week 1 Week 2 Week 3 Week 4 Week 5
Introduction to Computer Graphics with WebGL
CS 445 / 645 Introduction to Computer Graphics Lecture 23 Bézier Curves Lecture 23 Bézier Curves.
Cornell CS465 Fall 2004 Lecture 15© 2004 Steve Marschner 1 2D Spline Curves CS 465 Lecture 15.
Chapter VI Parametric Curves and Surfaces
INTERPOLATION & APPROXIMATION. Curve algorithm General curve shape may be generated using method of –Interpolation (also known as curve fitting) Curve.
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
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.
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.
Computer Graphics Representing Curves and Surfaces.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 8 of 41 William H. Hsu Department of Computing.
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.
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.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
11/26/02(C) University of Wisconsin Last Time BSplines.
Slide 129 October 1999CS Computer Graphics (Top Changwatchai) Bézier Curves - Results of Derivation Tangents at endpoints are equal to endpoint slopes.
Splines Sang Il Park Sejong University. Particle Motion A curve in 3-dimensional space World coordinates.
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.
Introduction to Parametric Curve and Surface Modeling.
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 SPLINES
© University of Wisconsin, CS559 Spring 2004
CS5500 Computer Graphics May 11, 2006
CS 445 / 645 Introduction to Computer Graphics
(Spline, Bezier, B-Spline)
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Chapter XVII Parametric Curves and Surfaces
Three-Dimensional Object Representation
Introduction to Parametric Curve and Surface Modeling
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 30 of 42 Wednesday, 09 April 2008 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: Course web site: Instructor home page: Readings: Sections 11.8 – 11.9, Eberly 2 e – see Curves 2: Subdivision

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Understanding and Using OpenGL EvalMesh/EvalCurve Render a smooth, cubic surface by tessellating it into a set of triangles See: evalMesh*d © 2006 Rotenberg, S., University of California San Diego

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics The Curves of Bezier Last week, we talking about drawing straight lines. What if we need to represent a curve of some sort? Use lots of little lines?

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics What is a spline? A flexible strip, used to draw a smooth curve through a set of points Can be described with a piecewise polynomial function whose first and second derivatives are continuous across the various sections (that is, slope and acceleration are changing smoothly)

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Bezier Curve A sort of friendly spline N control points Blending functions, BEZ(n,k) are the Bernstein Polynomials Curve always passes through first and last control points

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Splines in use

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Splines in use

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Splines in use

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Rendering splines

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Rendering splines

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Method I used: De Casteljau's Algorithm  Simple to implement  Can use your knowledge of vectors  A little bit too much recursion

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Main points on Bezier curves We normally use cubic curves (trade-off of control vs. computation time) We can string together lots of curve sections to make what we like Good for drawing Good for animating Understand and be able to implement De Casteljau’s or any other algorithm for plotting Beziers And in 3D…

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Today Review Motivation Curves – What's a Spline? – Linear Interpolation – Interpolation Curves vs. Approximation Curves – Bézier – BSpline (NURBS) Surfaces / Patches Subdivision Surfaces Procedural Texturing MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Definition: What's a Spline? Smooth curve defined by some control points Moving the control points changes the curve MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Interpolation Curves / Splines MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Linear Interpolation Simplest "curve" between two points MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Interpolation Curves Curve is constrained to pass through all control points Given points P0, P1,... Pn, find lowest degree polynomial which passes through the points MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Interpolation vs. Approximation Curves MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Interpolation vs. Approximation Curves Interpolation Curve –over constrained →lots of (undesirable?) oscillations Approximation Curve –more reasonable? MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Cubic Bézier Curve 4 control points Curve passes through first & last control point Curve is tangent at P0 to (P0-P1) and at P4 to (P4-P3) MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Cubic Bézier Curve de Casteljau's algorithm for constructing Bézier curves MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Cubic Bézier Curve MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Connecting Cubic Bézier Curves How can we guarantee C0 continuity (no gaps)? How can we guarantee C1 continuity (tangent vectors match)? Asymmetric: Curve goes through some control points but misses others MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Higher-Order Bézier Curves > 4 control points Bernstein Polynomials as the basis functions Every control point affects the entire curve – Not simply a local effect – More difficult to control for modeling Courtesy of Seth Teller. Used with permission. MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Cubic BSplines 4 control points Locally cubic Curve is not constrained to pass through anycontrol points MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Cubic BSplines Iterative method for constructing BSplines Shirley, Fundamentals of Computer Graphics Courtesy of Seth Teller. Used with permission. MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Cubic BSplines MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Cubic BSplines can be chained together better control locally (windowing) MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Bézier is not the same as BSpline Relationship to the control points is different MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Bézier is not the same as BSpline But we can convert between the curves using the basis functions: MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics NURBS (generalized BSplines) BSpline: uniform cubic BSpline NURBS: Non-Uniform Rational BSpline – non-uniform = different spacing between the blending functions, a.k.a. knots – rational = ratio of polynomials (instead of cubic) MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Questions? MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Today Review Motivation Spline Curves Spline Surfaces / Patches – Tensor Product – Bilinear Patches – Bezier Patches Subdivision Surfaces Procedural Texturing MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Tensor Product Of two vectors: Similarly, we can define a surface as the tensor product of two curves.... MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Bilinear Patch MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Bilinear Patch Smooth version of quadrilateral with non-planar vertices... – But will this help us model smooth surfaces? – Do we have control of the derivative at theedges? MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Bicubic Bezier Patch MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Trimming Curves for Patches MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Questions? MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Review Motivation Spline Curves Spline Surfaces / Patches Subdivision Surfaces Procedural Texturing Today MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Chaikin's Algorithm MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Doo-Sabin Subdivision MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Doo-Sabin Subdivision

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Loop Subdivision MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Loop Subdivision Some edges can be specified as crease edges Image removed due to copyright considerations MIT EECS 6.837, Durand and Cutler

Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Weird Subdivision Surface Models MIT EECS 6.837, Durand and Cutler