2IV60 Computer graphics set 7: Basic Geometric Modeling Jack van Wijk TU/e.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

Chapter 2: Graphics Programming
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
2IV60 Computer graphics Graphics primitives and attributes Jack van Wijk TU/e.
1 Introduction Curve Modelling Jack van Wijk TU Eindhoven.
Curves and Surfaces in OpenGL CS4395: Computer Graphcis 1 Mohan Sridharan Based on slides created by Edward Angel.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 8: Intro to 3D objects, meshes Ravi Ramamoorthi
Computer Graphics - Class 14
1. 2 The use of curved surfaces allows for a higher level of modeling, especially for the construction of highly realistic models. There are several approaches.
Texture Mapping April 9, The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number.
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.
Texture Mapping Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
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.
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
OpenGL Brian Farrimond Robina Hetherington. What is OpenGL A specification of a set of functions for drawing graphics –Names of functions –What information.
Introduction to Modeling. What is CG Modeling? Combination of Sculpting, Architecture, Drafting, and Painting. The core component of computer animation.
Computer Graphics Lecture 13 Curves and Surfaces I.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Texture Mapping. 2 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insufficient.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Jehee Lee Seoul National University
Computer Graphics Computer Graphics is everywhere: Visual system is most important sense: High bandwidth Natural communication Fast developments in Hardware.
Graphics Graphics Korea University cgvr.korea.ac.kr Creating Virtual World I 김 창 헌 Department of Computer Science Korea University
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
Fundamentals of Computer Graphics Part 9 Discrete Techniques prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared.
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Object Representation Rama C Hoetzlein, 2010 Univ. of California Santa Barbara Lecture Notes.
Curves and Surfaces Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Angel: Interactive.
CS 376 Introduction to Computer Graphics 04 / 20 / 2007 Instructor: Michael Eckmann.
CS559: Computer Graphics Lecture 24: Shape Modeling Li Zhang Spring 2010.
Introduction to Computer Graphics: Object Representation Rama C Hoetzlein, 2010 Univ. of California Santa Barbara Lecture Notes.
Curves and Surfaces Chapter 10. CS 480/680 2Chapter 9 -- Hierarchical Models Introduction: Introduction: Until now we have worked with flat entities such.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Texture Mapping May 4, Many slides are borrowed from UNC-CH COMP236 Course (Spring 2003) taught by Leonard McMillan
Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?
Basic Ray Tracing CMSC 435/634.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
Basic Theory (for curve 02). 1.3 Parametric Curves  The main aim of computer graphics is to display an arbitrary surface so that it looks real.  The.
Bézier Curves & Surfaces Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, March 1, 2004.
In the name of God Computer Graphics Bastanfard. Curve Function(2) Other method is approximate it using a poly-line. Just locate a set of points along.
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.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 15 Creating 3D Models.
2 3D Viewing Process  3D viewing process MC Model Space Model Transformation Model Transformation WC World Space Viewing Transformation Viewing Transformation.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
University of New Mexico
Texture Mapping.
Computer Graphics Texture Mapping
Computer Graphics.
Curves and Surfaces in OpenGL
CS5500 Computer Graphics May 11, 2006
Curves and Surfaces.
POLYGON MESH Advance Computer Graphics
Five Minute Madness: 30 Years in 30 Minutes
Real-time Computer Graphics Overview
Chapter 14 Shading Models.
CPT 450 Computer Graphics 5th Lecture.
University of New Mexico
University of New Mexico
Curves and Surfaces Ed Angel
UNIT-5 Curves and Surfaces.
Introduction to Computer Graphics with WebGL
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Chapter 14 Shading Models.
Presentation transcript:

2IV60 Computer graphics set 7: Basic Geometric Modeling Jack van Wijk TU/e

Geometric modeling 1 The world is full of all kind of objects: Trees, people, cars, housed, clouds, rocks, waves, pencil sharpeners, fire, mountains, plants, … How can we describe these, such that they are -easy to enter; -easy to process; -easy to display? Complex problem, HUGE topic!

Geometric modeling 2 Input: by user -preferably on a high level, customized to application by scanning objects -laser scanners: points -medical scanners: voxels

Geometric modeling 3 triangles User Scanner conversion graphics pipeline image 3D points, voxels Instructions, specifications

Smooth Curves (2D) Two standard methods: Parametric: X(t) = (x(t), y(t)) Implicit: f(x, y) = 0 H&B A-8,9:

Parametric description line 1 Given point P and vector V: X(t) = P + Vt Given two points P en Q: X(t) = P + (Q  P)t, or = P(1  t) + Qt Segment: t min  t  t max x y P V t Q H&B A-8,9:

Parametric description curve X(t) = (x(t), y(t)) Drawing a curve in a simple way, approximate with a polyline: MoveTo(X(0)); for i := 1 to N do LineTo(X(i  t)); H&B A-8,9:

Drawing a curve with OpenGL 1 X(float t):Point; { P[0]= …; P[1]=…; P[2]=…; return P; }; DrawX(); { N = 12; // use symbolic name for the number of segments int i; float dt := (tmax – tmin)/N; glBegin(GL_LINE_STRIP); // GL_LINE_LOOP if closed curve for (i = 0; i <= N; i++) // bounds here: 0 - N glVertex3fv(X(tmin + i*dt)); glEnd(); } H&B 4-5:82-83

Drawing a curve with OpenGL 2 Using too few points: –jagged appearance; Using too many points: –slow, –fat appearance (many segments per pixel). H&B 4-5:82-83

Drawing a curve with OpenGL 3 Decide on #points: –characteristics shape; –size of shape on screen. –beforehand or adjust automatically. H&B 4-5:82-83

Implicit description line (X  P).N = 0 with N.V = 0 (N: normal vector) Also: ax+by+c=0 x y P V N H&B A-8,9:

Implicit description curve f >0 f <0 f = 0 f =-1 f = 1 f =-2 H&B A-8,9:

Circle x y r H&B A-8,9:

Curves (3D) Two standard methods: Parametric: X(t) = (x(t), y(t), z(t)) Implicit: f(x, y, z) = 0 and g(x, y, z) = 0 Intersection of two surfaces H&B A-8,9:

Circle in 3D x y r z H&B A-8,9:

Surfaces H&B A-8,9: Polyhedra Parametric surfaces Implicit surfaces

Polyhedra Set of polygons that describe the surface of an object Often only triangles (hardware!) Many variations for storage (zie H&B 4-7) Often additional information per vertex (color, normal, texture, …) H&B 13-1:418

Curved surfaces Parametric: X(u,v) = (x(u,v), y(u,v), z(u,v)) Implicit: f(x, y, z) = 0 H&B 13-3:

Sphere 1 x y z v constant, u varies u constant, v varies H&B 13-4:

Sphere 2 x y H&B A-8,9: z v constant, u varies u constant, v varies u v

Sphere 3 x y z H&B 13-4:

Partial Derivatives 1 H&B A10:774

Partial Derivatives 2 H&B A10:774

Normal on surface 1 H&B A-10: T(u)T(u) P(u)P(u) u

Normal on surface 2 T u (u,v) P(u,v) u T v (u,v) v H&B A-10:

Normal on surface 3 T u (u,v) P(u,v) u T v (u,v) v N H&B A-10:

Normal on surface 4 x y z v u TuTu TvTv N H&B A-10:

Normal on surface 5 H&B A-10:

Normal on surface 6 N(x,y,z) (x,y,z) f(x,y,z)=0 H&B A-10:

Normal on surface 7 f >0 f <0 f = 0 H&B A-10:

Normal on surface 8 x y z N H&B A-10:

Quadratic surfaces 1 x y z H&B 13-4:

Quadratic surfaces 2 x y z a c b H&B 13-4:

Quadratic surfaces 3 (0, y, z) y as rara r z as y (x, y, z) y as x as H&B 13-4:

Drawing surfaces with OpenGL 1 Quadratic surfaces: GLU and GLUT offer some basic functions: –glutSolidSphere(r, nLon, nLat); –glutSolidCone(rbase, rheight, nLon, nLat); –glutSolidTeapot(size); –gluSphere, gluCylinder, Teapot? –Google: Utah teapot; –Google: Stanford bunny. H&B 13-6:

Drawing surfaces with OpenGL 1 Quadratic surfaces: GLU and GLUT offer some basic functions: –glutSolidSphere(r, nLon, nLat); –glutSolidCone(rbase, rheight, nLon, nLat); –glutSolidTeapot(size); –gluSphere, gluCylinder, Alternative: Define your own, custom versions, based on standard way to render parametric surfaces. H&B 13-6:

Drawing surfaces with OpenGL 2 X(float u, v):Point; { P[0]= …; P[1]=…; P[2]=…; return P; }; DrawX(); { NU, NV = 12; // use symbolic names for numbers of points again int i, j; float du := (umax – umin)/NU; float dv := (vmax – vmin)/NV; for (j = 0; j < NV; j++) { glBegin(GL_QUAD_STRIP); for (i = 0; i <= NU; j++) { glVertex3fv(X(umin + i*du, vmin + j*dv)); glVertex3fv(X(umin + i*du, vmin + (j+1)*dv)); } glEnd(); }

Drawing surfaces with OpenGL 3 Many variations possible –using triangle strips; –inserting normals, shading info, texture,... Selecting the number of facets: –too few: jagged appearance; –too many: slow; –decide beforehand or automatically, based on size on screen and curvature surface. H&B 4-5:82-83

Next… We now know how to define basic objects. Stay tuned for splines: arbitrary curves and curved surfaces. But first: let’s consider illumination and shading.