CHAPTER 10 Curves and Surfaces Vivian by Richard S. Wright Jr.

Slides:



Advertisements
Similar presentations
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
Advertisements

© University of Wisconsin, CS559 Spring 2004
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.
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Week 4 : Curves Topics: parametric curves, Bezier curves, Hermite curves, b-splines/NURBS curves, NURBS surfaces.
Curves and Surfaces in OpenGL CS4395: Computer Graphcis 1 Mohan Sridharan Based on slides created by Edward Angel.
Rational Bezier Curves
Offset of curves. Alina Shaikhet (CS, Technion)
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.
09/25/02 Dinesh Manocha, COMP258 Subdividing a Bezier Patch Subdivide separately along u and v parameters To subdivide along the u parameter, subdivide.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Cubic Bezier and B-Spline Curves
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
ENDS 375 Foundations of Visualization Geometric Representation 9/30/04.
ENDS 375 Foundations of Visualization Geometric Representation 10/5/04.
RASTER CONVERSION ALGORITHMS FOR CURVES: 2D SPLINES 2D Splines - Bézier curves - Spline curves.
Bezier and Spline Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
COEN Computer Graphics I
Chapter 10: Curves and Surfaces Part 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Curves and Surfaces in OpenGL Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
Parts of Mortenson Chapter 6-9,
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
Parametric Curves & Surfaces
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
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.
Curves and Surfaces CSE3AGR - Paul Taylor Polynomials of Degree n Degree is equal to the highest exponent of a term. Higher exponents result in.
19/13/ :20 UML Graphics II Parametric Curves and Surfaces Session 3.
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.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 16.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to Computer Graphics with WebGL
Graphics Programming using OpenGL. OpenGL is a software interface that allows the programmer to create 2D and 3D graphics images. This interface consists.
1 Dr. Scott Schaefer Smooth Curves. 2/109 Smooth Curves Interpolation  Interpolation through Linear Algebra  Lagrange interpolation Bezier curves B-spline.
Picking and Curves Week 6 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University of New Mexico CS 480/680.
Review of Interpolation. A method of constructing a function that crosses through a discrete set of known data points.
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 surfaces.
Curves and Surfaces Chapter 10. CS 480/680 2Chapter 9 -- Hierarchical Models Introduction: Introduction: Until now we have worked with flat entities such.
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.
Higher Order Surfaces in OpenGL with NV_evaluators Cass Everitt
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
Parametric Curves & Surfaces
Splines I – Curves and Properties based on: Michael Gleicher Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
11/26/02(C) University of Wisconsin Last Time BSplines.
Parametric Curves CS 318 Interactive Computer Graphics John C. Hart.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 10.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 30 of 42 Wednesday, 09.
SIAM Conference on Geometric Desing & Computing Approximation of spatial data with shape constraints Maria Lucia Sampoli University of Siena, Italy.
Introduction to Parametric Curve and Surface Modeling.
Curves and Surfaces in OpenGL
CS5500 Computer Graphics May 11, 2006
Representation of Curves & Surfaces
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Computer Graphics Algorithms Ying Zhu Georgia State University
Introduction to Parametric Curve and Surface Modeling
Overview June 9- B-Spline Curves June 16- NURBS Curves
Presentation transcript:

CHAPTER 10 Curves and Surfaces Vivian by Richard S. Wright Jr.

Objectives Introduce OpenGL evaluators Learn to render polynomial curves and surfaces Discuss quadrics in OpenGL - GLUT Quadrics - GLU Quadrics

What Does OpenGL Support? Evaluators: a general mechanism for working with the Bernstein polynomials - Can use any degree polynomials - Can use in 1-4 dimensions - Automatic generation of normals and texture coordinates - NURBS supported in GLU Quadrics –GLU and GLUT contain polynomial approximations of quadrics

Quadrics

Void gluQuadricDrawStyle(GLUquadricObj *obj, GLenum drawStyle); void gluQuadricNormals(GLUquadricObj *pbj, GLenum normals);

Draw a quadrics Draw a sphere: –void gluSphere(GLUQuadricObj *obj, GLdouble radius, GLint slices, GLint stacks);

Draw a quadrics void gltDrawUnitAxes(void)

Curves and Surfaces Overview What is a parametric curve/surface? Why use parametric curves & surfaces? B é zier curves & surfaces NURBS Trimmed surfaces OpenGL library

What is a parametric curve? 2D parametric curve takes the form xyxy f(t) g(t) Where f(t) and g(t) are functions of t = Example: Line thru points a and b xyxy (1-t) a x + t b x (1-t) a y + t b y = Mapping of the real line to 2D: here t in [0,1]  line segment a,b y = mx + b

What is a parametric curve? 3D curves defined similarly xyzxyz f(t) g(t) h(t) = Example: helix xyzxyz cos(t) sin(t) t =

Parametric representation of curves and surfaces.

Control Points The order of the curve is represented by the number of control points used to describe its shape. The degree is one less than the order of the curve.

B é zier Curves Example s linear: b(t) = (1-t) b 0 + t b 1 quadratic: b(t) = (1-t) 2 b 0 + 2(1-t)t b 1 + t 2 b 2 cubic: b(t) = (1-t) 3 b 0 + 3(1-t) 2 t b 1 + 3(1-t)t 2 b 2 + t 3 b 3 Bernstein basis B i n (t) = {n!/(n-i)! i!} (1-t) n-i t i n=1 n=2 n=3

Continuity

B é zier Curves in OpenGL Basic steps:  Define curve by specifying degree, control points and parameter space [u0,u1]  Enable evaluator  Call evaluator with parameter u in [u0, u1] Specify each u: glEvalCoord1*() Autocreate uniformly spaced u: glMapGrid1*() glEvalMesh1() glMap1*() or Color and texture available too!

What is a parametric surface? 3D parametric surface takes the form xyzxyz f(u,v) g(u,v) h(u,v) Where f,g,h are bivariate functions of u and v = mapping u,v-space to 3-space; this happens to be a function too Example: x(u,v) = u v u 2 + v 2

B é zier Surfaces in OpenGL Basic steps:  Define curve by specifying degree, control points and parameter space [u0,u1]  Enable evaluator  Call evaluator with parameter u in [u0, u1,v0, v1] glMap2*()

B é zier Surface Multiple patches connected smoothly Conditions on control net similar to curves … difficult to do manually

NURBS Non-uniform Rational B-splines B-splines are piecewise polynomials One or more Bezier curves /surfaces One control polygon Rational: let’s us represent circles exactly GLU NURBS utility

From Bézier to B-Splines

Creating a NURBS Surface Evaluator → NURBS Knots

Trimming

Trimmed Surfaces Parametric surface with parts of the domain “ invisible ” Jorg Peters’ UFL group GLU Trimmed NURBS utility Surf Lab domain