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

Slides:



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

COMPUTER GRAPHICS CS 482 – FALL 2014 OCTOBER 8, 2014 SPLINES CUBIC CURVES HERMITE CURVES BÉZIER CURVES B-SPLINES BICUBIC SURFACES SUBDIVISION SURFACES.
Lecture 10 Curves and Surfaces I
Cubic Curves CSE167: Computer Graphics Instructor: Steve Rotenberg UCSD, Fall 2006.
ICS 415 Computer Graphics Bézier Splines (Chapter 8)
Overview June 9- B-Spline Curves June 16- NURBS Curves June 30- B-Spline Surfaces.
© University of Wisconsin, CS559 Spring 2004
B-Spline Blending Functions
Dr. S.M. Malaek Assistant: M. Younesi
1 Curves and Surfaces. 2 Representation of Curves & Surfaces Polygon Meshes Parametric Cubic Curves Parametric Bi-Cubic Surfaces Quadric Surfaces Specialized.
Lecture 29 of 42 Bezier Curves and Splines Wednesday, 02 April 2008
1 Computer Graphics Chapter 7 3D Object Modeling.
Informationsteknologi Monday, December 10, 2007Computer Graphics - Class 161 Today’s class Curve fitting Evaluators Surfaces.
Computer Graphics - Class 14
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.
Chapter 10: Curves and Surfaces Part 1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
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.
Computer Graphics Lecture 13 Curves and Surfaces I.
Curves and Surfaces (cont’) Amy Zhang. Conversion between Representations  Example: Convert a curve from a cubic B-spline curve to the Bézier form:
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.
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.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 20 of 41 William H. Hsu Department of Computing.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
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
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
CS 376 Introduction to Computer Graphics 04 / 20 / 2007 Instructor: Michael Eckmann.
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.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Representation of Curves and Surfaces Graphics.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
04/18/02(c) 2002 University of Wisconsin Last Time Hermite Curves Bezier Curves.
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.
11/26/02(C) University of Wisconsin Last Time BSplines.
Designing Parametric Cubic Curves 1. 2 Objectives Introduce types of curves ­Interpolating ­Hermite ­Bezier ­B-spline Analyze their performance.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
1 대상물체의 형상화를 위해 사용되는 기술  인공물체 : 기하학적 Primitive ( 선, 면, 구, 육면체 ) 등을 이 용하여 형상화. 입력물 : 형상화 물체의 3 차원 좌표값 출력물 : 선구조형상 (Wire framed objects) Technique:Geometric.
Curves University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
Object Modeling: Curves and Surfaces CEng 477 Introduction to Computer Graphics.
3D Object Representations. Introduction Line and circle and polygon algorithms- represented simple and smooth object. Some Natural object are neither.
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
Curve & Surface.
Representation of Curves & Surfaces
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
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 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11 April 2008 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: Course web site: Instructor home page: Readings: Sections 12.2 – 12.5, 12.7, Eberly 2 e – see No class Friday, 18 Apr 2008 (lab next Monday) Surfaces 2: Bicubic Surfaces

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Surface Modelling © 2007 McCaul, B., City University Dublin CA433 Computer Graphics I

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Many real-world objects are inherently smooth, therefore need infinitely many points to model it. This is not feasible for a computer with finite storage. More often we merely approximate the object with pieces of planes, spheres, or other shapes that are easy to describe mathematically. We will introduce two most common representations for 3D surfaces: polygon mesh surfaces and parametric surfaces. We will also discuss parametric curves since parametric surfaces are a generalisation of the curves. Modelling the Elegant Teapot © 2007 McCaul, B., City University Dublin CA433 Computer Graphics I

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Polygon Meshes VERTEX TABLE V 1 : x 1, y 1, z 1 V 2 : x 2, y 2, z 2 V 3 : x 3, y 3, z 3 V 4 : x 4, y 4, z 4 V 5 : x 5, y 5, z 5 EDGE TABLE E 1 : V 1, V 2 E 2 : V 2, V 3 E 3 : V 3, V 1 E 4 : V 3, V 4 E 5 : V 4, V 5 E 6 : V 5, V 1 POLYGON TABLE P 1 : V 1, V 2, V 3 P 2 : V 1, V 3, V 4, V 5 POLYGON TABLE P 1 : E 1, E 2, E 3 P 2 : E 3, E 4, E 5, E 6 or E1E1 E2E2 E3E3 E5E5 E4E4 E6E6 V2V2 V3V3 V4V4 V5V5 V1V1 P1P1 P2P2

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics The geometry can be stored as three tables: a vertex table, an edge table, and a polygon table. Each entry in the vertex table is a list of coordinates defining that point. Each entry in the edge table consists of a pointer to each endpoint of that edge. And the entries in the polygon table define a polygon by providing pointers to the edges that make up the polygon. We can eliminate the edge table by letting the polygon table reference the vertices directly, but we can run into problems, such as drawing some edges twice, because we don't realise that we have visited the same set of points before, in a different polygon. We could go even further and eliminate the vertex table by listing all the coordinates explicitly in the polygon table, but this wastes space because the same points appear in the polygon table several times. Polygon Meshes

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Representing Polygon Meshes 1).The explicit way: just list 3D vertices of each polygon in a certain order. The problems are, firstly it represents same vertex many times and secondly, no explicit representation of shared edges and vertices 2).Pointer to a vertex list: store all vertices once into a numbered list, and represent each polygon by its vertices. It saves space (vertex only listed once) but still has no explicit representation of shared edges and vertices 3).Explicit edges: list all edges that belong to a polygon, and for each edge list the vertices that define it along with the polygons of which it is a member.

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Types of Curves 1).Explicit: In the Cartesian plane, an explicit equation of a planar curve is given by y = f(x). The difficulties with this approach are that (1) it is impossible to get multiple values of y for a single x, so curves such as circles and ellipses must be represented by multiple curve segments; and (2) describing curves with vertical tangents is difficult and numerically unstable. 2).Implicit: f(x, y) = 0Ax+By+C =0 This method has difficulties on determining tangent continuity of two given curves which is crucial in many applications. (Circle can be defined as: x 2 +y 2 =1, but what about a half circle?)

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Types of Curves 3).Parametric Curves: The cubic polynomials that defines a curve segment Q(t)= [x(t) y(t)] T are of the form Written in matrix form, it becomes Q(t)= [x(t) y(t)] = T  C where

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Parametric Bicubic Surfaces The equations that describe a parametric curve depend on a variable t that is not explicitly part of the geometry. By sweeping through t, in our case 0 ≤ t ≤ 1, it is possible to evaluate the equations and determine the x and y values for points on the curve. t = 0.0 t = 1.0 t Parameter spaceObject space

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Parametric Bicubic Surfaces Parametric Bicubic Surfaces are a generalisation of parametric cubic curves If one parameter, say v, is held at a constant value then the above will represent a curve. The surface is then generated by sweeping all points on the boundary curve P(u,0) (say) through cubic trajectories, defined using the parameter v, to the boundary curve P(u,1). v=0 u=0 u=1 v=1

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics The representation of the bicubic surface patch can be illustrated by considering the Bézier Surface Patch. The edge P(0,v) of a Bezier patch is defined by giving four control points P 00, P 01, P 02 and P 03. Similarly the opposite edge P(1,v) can be represented by a Bezier curve with four control points. The surface patch is generated by sweeping the curve P(0,v) through a cubic trajectory in the parameter u to P(1,v). To define this trajectory we need four control points, hence the Bezier surface patch requires a mesh of 4  4 control points as illustrated below. Bézier Surface Patch

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Further reading… Chapter 11 of Foley and VanDam  Representing Curves and Surfaces

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Surfaces – a Simple Extension Easy to generalise from cubic curves to bicubic surfaces. Surfaces defined by parametric equations of two variables, s and t. ie. a surface is approximated by a series of crossing parametric cubic curves Result is a polygon mesh and decreasing step size in s and t will give a mesh of small near-planar quadrilateral patches and more accuracy. © 2007 Hawick, K. Massey University (New Zealand) Graphics and Graphical Programming

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Example Bézier surface

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Control of Surface Shape Control is now a 2D array of control points. The two parameter surface function, forming the tensor product with the blending functions is: Use appropriate blending functions for Bézier and B-Spline surface functions. Convex Hull property is preserved since bicubic is still a weighted sum (1).

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Bézier Example Matrix formulation is as follows: Substitute suitable values for s and t (20 in the above ex.)

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics B-Spline Surfaces Break surface into 4-sided patches choosing suitable values for s and t. Points on any external edges must be multiple knots of multiplicity k. Lot more work than Bézier. There are other types of spline systems and NURBS modelling packages are available to make the work much easier. Use polygon packages for display, hidden-surface removal and rendering. (Bézier too)

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Continuity of Bicubic Patches Hermite and Bézier patches  C 0 continuity by sharing 4 control points between patches.  C 1 continuity when both sets of control points either side of the edge are collinear with the edge. B-Spline patch.  C 2 continuity between patches.

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Displaying Bicubic Patches Can calculate surface normals to bicubic surfaces by vector cross product of the 2 tangent vectors. Normal is expensive to compute  Formulation of normal is a biquintic (two-variable,fifth-degree) polynomial. Display.  Can use brute-force method – very expensive !  Forward differencing method very attractive.

Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Curves & Surfaces II - Summary Bezier Curves Bicubic patches Acknowledgments - thanks to Eric McKenzie, Edinburgh, from whose Graphics Course some of these slides were adapted.