Curves and Surfaces CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.

Slides:



Advertisements
Similar presentations
Splines I – Curves and Properties
Advertisements

COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 13, 2014 IMPLICIT REPRESENTATIONS IMPLICIT FUNCTIONS IMPLICIT SURFACES MARCHING CUBES.
08/30/00 Dinesh Manocha, COMP258 Hermite Curves A mathematical representation as a link between the algebraic & geometric form Defined by specifying the.
Slide 127 October 1999CS Computer Graphics (Top Changwatchai) Review of Spline Concepts Sections 10-6 to in Hearn & Baker Splines can be 2D.
Shading II CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
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.
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 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.
Chapter 16 – Vector Calculus
Multiple Integrals 12. Surface Area Surface Area In this section we apply double integrals to the problem of computing the area of a surface.
Designing Parametric Cubic Curves
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.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Geometry. 2 Objectives Introduce the elements of geometry ­Scalars ­Vectors ­Points Develop mathematical operations among them in a coordinate-free.
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.
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.
Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel: Interactive.
Curves. First of all… You may ask yourselves “What did those papers have to do with computer graphics?” –Valid question Answer: I thought they were cool,
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.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 52 Computer Graphics Three-Dimensional Graphics I.
Copyright © Cengage Learning. All rights reserved. 16 Vector Calculus.
Ship Computer Aided Design MR 422. Geometry of Curves 1.Introduction 2.Mathematical Curve Definitions 3.Analytic Properties of Curves 4.Fairness of Curves.
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.
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.
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.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
Introduction to Parametric Curve and Surface Modeling.
CS5500 Computer Graphics May 11, 2006
Computer Graphics Lecture 37
Óbuda University John von Neumann Faculty of Informatics
CS 430/536 Computer Graphics I Intro to Curves Week 4, Lecture 7
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
Computer Graphics Lecture 36 CURVES II Taqdees A. Siddiqi
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 CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel

Objectives Introduce types of curves and surfaces: – Explicit. – Implicit. – Parametric. – Strengths and weaknesses. Discuss Modeling and Approximations: – Conditions. – Stability. CS4395: Computer Graphics 2

Escaping Flatland Until now we have used flat entities: lines and 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. CS4395: Computer Graphics 3

Modeling with Curves CS4395: Computer Graphics 4 data points approximating curve interpolating data point

What Makes a Good Representation? Many ways to represent curves and surfaces. Want a representation that is: – Stable and smooth. – Easy to evaluate. – Questions: – Interpolate or can we just come close to data? – Do we need derivatives? CS4395: Computer Graphics 5

Explicit Representation Most familiar form of curve in 2D: y=f(x) Cannot represent all curves: – Vertical lines and circles. Extension to 3D: – y=f(x), z=g(x) – The form z = f(x, y) defines a surface. CS4395: Computer Graphics 6 x y x y z

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 surfaces to get a curve. – Challenge is to obtain points on the curve. CS4395: Computer Graphics 7

Algebraic Surface CS4395: Computer Graphics 8 Algebraic surfaces: Quadric surface: 2  I + j + k. Can solve intersection with a ray by reducing problem to solving a quadratic equation.

Parametric Curves Equation for each spatial variable in terms of independent parameter: x=x(u) y=y(u) z=z(u) For u max  u  u min we trace out a curve in 2D or 3D. CS4395: Computer Graphics 9 p(u)=[x(u), y(u), z(u)] T p(u) p(u min ) p(u max )

Parametric Form Derivative of the parametric representation is the “velocity” with which the curve is traced out. Velocity tangential to the curve. CS4395: Computer Graphics 10

Selecting Functions Usually we can select “good” functions: – Not unique for a given spatial curve. – Approximate or interpolate known data. – Want functions that are easy to evaluate and differentiate. Computation of normals. Connecting pieces (segments). – Want functions that are smooth. CS4395: Computer Graphics 11

Parametric Lines CS4395: Computer Graphics 12 p(u)=(1-u)p 0 +up 1 p(0) = p 0 p(1)= p 1 p(u)=p 0 +ud p(0) = p 0 p(1)= p 0 +d d Can normalize u to be over the interval [0, 1]. Line connecting two points p 0 and p 1 : Ray from p 0 in the direction d:

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. CS4395: Computer Graphics 13 x y z p(u,0) p(1,v) p(0,v) p(u,1)

Normals We can differentiate with respect to u and v to obtain the normal at any point p. CS4395: Computer Graphics 14

Parametric Planes CS4395: Computer Graphics 15 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

Parametric Sphere CS4395: Computer Graphics 16 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

Curve Segments After normalizing u, each curve is written as: p(u)=[x(u), y(u), z(u)] T, 1  u  0 Classical numerical methods design a single global curve. Computer graphics and CAD use small connected curve segments. CS4395: Computer Graphics 17 p(u) q(u) p(0) q(1) join point p(1) = q(0)

Parametric Polynomial Curves CS4395: Computer Graphics 18 General equations for each of x, y, z: If N=M=L, we need to determine 3(N+1) coefficients. Equivalently, we need 3(N+1) independent equations. 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:

Why Polynomials Easy to evaluate. Continuous and differentiable everywhere: – Must worry about continuity at join points including continuity of derivatives. CS4395: Computer Graphics 19 p(u) q(u) join point p(1) = q(0) but p’(1)  q’(0)

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. CS4395: Computer Graphics 20

Cubic Polynomial Surfaces CS4395: Computer Graphics 21 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