Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel: Interactive.

Slides:



Advertisements
Similar presentations
Splines I – Curves and Properties
Advertisements

08/30/00 Dinesh Manocha, COMP258 Hermite Curves A mathematical representation as a link between the algebraic & geometric form Defined by specifying the.
University of New Mexico
Shading II CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Ray Tracing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
Computer Graphics - Class 14
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Geometry Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Representation Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Curves Locus of a point moving with one degree of freedom
Designing Parametric Cubic Curves Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Geometric Modeling Surfaces Mortenson Chapter 6 and Angel Chapter 9.
Drawing Parametric Curves Jean-Paul Mueller. Curves - The parametric form of a curve expresses the value of each spatial variable for points on the curve.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2006 Shading II Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Bezier and Spline Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Chapter 10: Curves and Surfaces Part 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Designing Parametric Cubic Curves
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
1 Representing Curves and Surfaces. 2 Introduction We need smooth curves and surfaces in many applications: –model real world objects –computer-aided.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
V. Space Curves Types of curves Explicit Implicit Parametric.
Introduction to virtual engineering Óbuda University John von Neumann Faculty of Informatics Institute of Intelligent Engineering Systems Lecture 3. Description.
Introduction to Computer Graphics with WebGL
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
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.
Curves & surfaces 2 & 3 dimension representation.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Curves and Surfaces Chapter 10. CS 480/680 2Chapter 9 -- Hierarchical Models Introduction: Introduction: Until now we have worked with flat entities such.
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Introduction to Computer Graphics with WebGL
Interactive Graphics Lecture 10: Slide 1 Interactive Computer Graphics Lecture 10 Introduction to Surface Construction.
Rendering Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel:
11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Parametric Curves & Surfaces Greg Humphreys University of Virginia CS 445, Spring.
Splines I – Curves and Properties based on: Michael Gleicher Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 10.
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Bump Mapping Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
Computer Graphics I, Fall 2010 Geometry.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Introduction to Parametric Curve and Surface Modeling.
Representation of Geometry in Model Space
Computer Graphics Lecture 37
Óbuda University John von Neumann Faculty of Informatics
Shading II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer.
University of New Mexico
University of New Mexico
University of New Mexico
Rendering Curves and Surfaces
Designing Parametric Cubic Curves
Curves and Surfaces Ed Angel
Introduction to Computer Graphics with WebGL
UNIT-5 Curves and Surfaces.
Introduction to Computer Graphics with WebGL
Curves and Surfaces (I)
6. Surfaces and Surface Modeling
Designing Parametric Cubic Curves
Presentation transcript:

Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

2 Objectives Introduce types of curves and surfaces ­Explicit ­Implicit ­Parametric ­Strengths and weaknesses Discuss Modeling and Approximations ­Conditions ­Stability

3 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Escaping Flatland Until now we have worked with flat entities such as lines and flat polygons ­Fit well with graphics hardware ­Mathematically simple But the world is not composed of flat entities ­Need curves and curved surfaces ­May only have need at the application level ­Implementation can render them approximately with flat primitives

4 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Modeling with Curves data points approximating curve interpolating data point

5 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 What Makes a Good Representation? There are many ways to represent curves and surfaces Want a representation that is ­Stable ­Smooth ­Easy to evaluate ­Must we interpolate or can we just come close to data? ­Do we need derivatives?

6 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Explicit Representation Most familiar form of curve in 2D y=f(x) Cannot represent all curves ­Vertical lines ­Circles Extension to 3D ­y=f(x), z=g(x) ­The form z = f(x,y) defines a surface x y x y z

7 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Implicit Representation Two dimensional curve(s) g(x,y)=0 Much more robust ­All lines ax+by+c=0 ­Circles x 2 +y 2 -r 2 =0 Three dimensions g(x,y,z)=0 defines a surface ­Intersect two surface to get a curve In general, we cannot solve for points that satisfy

8 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Algebraic Surface Quadric surface 2  i+j+k At most 10 terms Can solve intersection with a ray by reducing problem to solving quadratic equation

9 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Parametric Curves Separate equation for each spatial variable x=x(u) y=y(u) z=z(u) For u max  u  u min we trace out a curve in two or three dimensions p(u)=[x(u), y(u), z(u)] T p(u) p(u min ) p(u max )

10 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Selecting Functions Usually we can select “good” functions ­not unique for a given spatial curve ­Approximate or interpolate known data ­Want functions which are easy to evaluate ­Want functions which are easy to differentiate Computation of normals Connecting pieces (segments) ­Want functions which are smooth

11 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Parametric Lines Line connecting two points p 0 and p 1 p(u)=(1-u)p 0 +up 1 We can normalize u to be over the interval (0,1) p(0) = p 0 p(1)= p 1 Ray from p 0 in the direction d p(u)=p 0 +ud p(0) = p 0 p(1)= p 0 +d d

12 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Parametric Surfaces Surfaces require 2 parameters x=x(u,v) y=y(u,v) z=z(u,v) p(u,v) = [x(u,v), y(u,v), z(u,v)] T Want same properties as curves: ­Smoothness ­Differentiability ­Ease of evaluation x y z p(u,0) p(1,v) p(0,v) p(u,1)

13 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Normals We can differentiate with respect to u and v to obtain the normal at any point p

14 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Parametric Planes point-vector form p(u,v)=p 0 +uq+vr n = q x r q r p0p0 n three-point form p0p0 n p1p1 p2p2 q = p 1 – p 0 r = p 2 – p 0

15 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Parametric Sphere x(u,v) = r cos  sin  y(u,v) = r sin  sin  z(u,v) = r cos  360       0  constant: circles of constant longitude  constant: circles of constant latitude differentiate to show n = p

16 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Curve Segments After normalizing u, each curve is written p(u)=[x(u), y(u), z(u)] T, 1  u  0 In classical numerical methods, we design a single global curve In computer graphics and CAD, it is better to design small connected curve segments p(u) q(u) p(0) q(1) join point p(1) = q(0)

17 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Parametric Polynomial Curves If N=M=K, we need to determine 3(N+1) coefficients Equivalently we need 3(N+1) independent conditions Noting that the curves for x, y and z are independent, we can define each independently in an identical manner We will use the form where p can be any of x, y, z

18 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Why Polynomials Easy to evaluate Continuous and differentiable everywhere ­Must worry about continuity at join points including continuity of derivatives p(u) q(u) join point p(1) = q(0) but p’(1)  q’(0)

19 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Cubic Parametric Polynomials N=M=L=3, gives balance between ease of evaluation and flexibility in design Four coefficients to determine for each of x, y and z Seek four independent conditions for various values of u resulting in 4 equations in 4 unknowns for each of x, y and z ­Conditions are a mixture of continuity requirements at the join points and conditions for fitting the data

20 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Cubic Polynomial Surfaces p(u,v)=[x(u,v), y(u,v), z(u,v)] T where p is any of x, y or z Need 48 coefficients ( 3 independent sets of 16) to determine a surface patch