Representing Geometry in Computer Graphics Rick Skarbez, Instructor COMP 575 September 18, 2007.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

COMP 175 | COMPUTER GRAPHICS Remco Chang1/6103b – Shapes Lecture 03b: Shapes COMP 175: Computer Graphics February 3, 2015.
Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
© 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.
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
MIT EECS 6.837, Durand and Cutler Curves & Surfaces.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Object Representation 고려대학교 컴퓨터 그래픽스 연구실.
HCI 530 : Seminar (HCI) Damian Schofield.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 4: 3D Objects and Meshes Ravi Ramamoorthi
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
2003 by Jim X. Chen: Introduction to Modeling Jim X. Chen George Mason University.
Implicit Surfaces Tom Ouyang January 29, Outline Properties of Implicit Surfaces Polygonization Ways of generating implicit surfaces Applications.
Now Playing: My Mathematical Mind Spoon From Gimme Fiction Released May 10, 2005.
IE433 CAD/CAM Computer Aided Design and Computer Aided Manufacturing Part-4 Computer Graphics- CAD Software Dr. Abdulrahman M. Al-Ahmari Industrial Engineering.
Objects in 3D – Parametric Surfaces Computer Graphics Seminar MUM, summer 2005.
ENDS 375 Foundations of Visualization Geometric Representation 10/5/04.
Modelling: Curves Week 11, Wed Mar 23
IE433 CAD/CAM Computer Aided Design and Computer Aided Manufacturing Part-4 Computer Graphics- CAD Software Industrial Engineering Program King Saud University.
COEN Computer Graphics I
Curve Surfaces June 4, Examples of Curve Surfaces Spheres The body of a car Almost everything in nature.
10/5/04© University of Wisconsin, CS559 Fall 2004 Last Time Compositing Painterly Rendering Intro to 3D Graphics Homework 3 due Oct 12 in class.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
Curve Modeling Bézier Curves
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
1 Dr. Scott Schaefer Geometric Modeling CSCE 645/VIZA 675.
COMP 175: Computer Graphics March 24, 2015
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
1 Ray Tracing Polyhedra ©Anthony Steed
Geometric Modeling using Polygonal Meshes Lecture 1: Introduction Hamid Laga Office: South.
2D/3D Shape Manipulation, 3D Printing Shape Representations Slides from Olga Sorkine February 20, 2013 CS 6501.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Copyright © Curt Hill Visualization of 3D Worlds How are these images described?
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Digital Media Lecture 8: Vector Graphics 3D Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
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.
Background Mathematics Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Affine Transformations.
Geometric Modeling How to design a graphical model? How to create a digital description of a real-world object? Design Digitize.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
Representation of Curves & Surfaces Prof. Lizhuang Ma Shanghai Jiao Tong University.
Constructive Solid Geometry Ray Tracing CSG Models
In the name of God Computer Graphics. Introduction Modeling techniques modeling techniques managements Some renderings.
11/26/02(C) University of Wisconsin Last Time BSplines.
3D Object Representations 2011, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
1 Graphics CSCI 343, Fall 2015 Lecture 34 Curves and Surfaces III.
Introduction to Curves
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
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.
Digital Media Dr. Jim Rowan ITEC 2110 Vector Graphics II.
Introduction to Parametric Curve and Surface Modeling.
3D MODELLING PART-3 Wikitechy.
© University of Wisconsin, CS559 Spring 2004
3D Object Representations
3D Object Representation
Geometric Modeling CSCE 645/VIZA 675
Ray Tracing Polyhedra ©Anthony Steed
Introduction to Meshes
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Three-Dimensional Object Representation
3D Object Representation
Overview of Modeling 김성남.
Introduction to Meshes
Presentation transcript:

Representing Geometry in Computer Graphics Rick Skarbez, Instructor COMP 575 September 18, 2007

Adam Powers Richard Taylor Information International, Inc. (III), 1981

Announcements Programming Assignment 1 is out today Due next Thursday by 11:59pm ACM Programming Contest

First regional competition (at Duke) is Oct 27 Top teams at regionals get a free trip to worlds This year, in scenic Alberta Canada First meeting is this Thursday (09/20) at 7pm in 011 All are welcome!

Introduced the basics of OpenGL Did an interactive demo of creating an OpenGL/GLUT program Last Time

Today Review of Homework 1 Discussion and demo of Programming Assignment 1 Discussion of geometric representations for computer graphics

Homework 1 Noticed 2 recurring problems Normalized vs. Unnormalized points and vectors Matrix Multiplication

Points and Vectors in Homogeneous Coordinates To represent a point or vector in n-D, we use an (n+1)-D (math) vector Add a ‘w’ term We do this so that transforms can be represented with a single matrix

Points and Vectors in Homogeneous Coordinates Vectors (geometric) represent only direction and magnitude They do not have a location, so they cannot be affected by translation Therefore, for vectors, w = 0 Points have a location, and so are affected by translations Therefore, for points, w != 0

Points and Vectors in Homogeneous Coordinates A “normalized” point in homogeneous coordinates is a point with w = 1 Can normalize a point by dividing all terms by w:

Points and Vectors in Homogeneous Coordinates A “normalized” vector is a vector with magnitude = 1 Can normalize a vector by dividing all terms by the vector magnitude = sqrt(x^2 + y^2 + z^2) (in 3-D)

Matrix Multiplication Only well defined if the number of columns of the first matrix and the number of rows of the second matrix are the same Matrix * Matrix = Matrix i.e. if F is m x n, and G is n x p, then FG if m x p

Programming Assignment 1 Demo

Geometric Representations in Computer Graphics There are 2 most common ways of representing objects in computer graphics As procedures i.e. splines, constructive solid geometry As tessellated polygons i.e. a whole bunch of triangles

Analytic Representations Advantages: Can be as precise as you want That is, can compute as many points on the function as you want when rendering Derivatives, gradients, etc. are directly available Continuous and smooth Easy to make sure there are no holes

Analytic Representations Disadvantages: Not generalizable Therefore, SLOW! Often complicated

Tessellated Polygons Advantages: Very predictable Just pass in a list of vertices Therefore, can be made VERY FAST

Tessellated Polygons Disdvantages: Only know what the surface looks like at the vertices Derivatives, gradients, etc. are not smooth across polygons Can have holes

Analytic Representations Probably the most obvious way to use analytic representations is to just represent simple objects as functions Planes: ax + by + cz +d = 0 Spheres: (x - x o ) 2 + (y - y o ) 2 + (z - z o ) 2 = r 2 etc. We’ll do this when we’re ray-tracing

Analytic Representations There are many more procedural methods for generating curves and surfaces Bézier curves B-Splines Non-rational Uniform B-Splines (NURBS) Subdivision surfaces etc. We may cover some of these later on

Computer-Aided Design An application where analytic representations are commonly used is Computer-Aided Design (CAD) Why? Accuracy is very important Speed is not that important

Solid Modeling Another reason analytic models are often used in CAD is that they can directly represent solids The sign of a function can determine whether a point is inside or outside of an object

Constructive Solid Geometry (CSG) A method for constructing solid objects from Boolean combinations of solid primitives Operators: union, difference, intersection Primitives: spheres, cones, cylinders, cuboids, etc. Union Difference Intersection

Why Triangles? So, why are triangles the primitives of choice, and not squares, or septagons? Simplest polygon (only 3 sides) Therefore smallest representation Guaranteed to be convex Easy to compute barycentric coordinates

Barycentric Coordinates Every triangle defines a (possibly) non- orthogonal coordinate system Let a, b, and c be the vertices of the triangle Arbitrarily choose a as the origin of our new coordinate system Now any point p can be represented p = a + β(b - a) + γ(c - a) or, with α = 1 - β - γ, as p = αa + βb + γc

Barycentric Coordinates Why are these so great? Easy to tell if a point is inside the triangle A point is inside the triangle if and only if α, β, and γ are all between 0 and 1 Interpolation is very easy Needed for shading

Next Time Beginning our discussion of lighting and shading