Geometric Modeling 91.580.201 Mortenson Chapter 1 (including some material from Farin Ch. 2)

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Transformations Ed Angel Professor Emeritus of Computer Science
8.1 Prisms, Area and Volume Prism – 2 congruent polygons lie in parallel planes corresponding sides are parallel. corresponding vertices are connected.
3D Geometry for Computer Graphics
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
Invariants (continued).
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
The Structure of Polyhedra Gabriel Indik March 2006 CAS 746 – Advanced Topics in Combinatorial Optimization.
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
Chapter 12: Surface Area and Volume of Solids
By: Andrew Shatz & Michael Baker Chapter 15. Chapter 15 section 1 Key Terms: Skew Lines, Oblique Two lines are skew iff they are not parallel and do not.
1 Computer Graphics Chapter 7 3D Object Modeling.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
2D Geometric Transformations
Computer Graphics Recitation 5.
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 4: 3D Convex Hulls Friday, 2/9/07.
3-D Geometry.
Chapter 3 Determinants and Matrices
Cubic Bezier and B-Spline Curves
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 4: 3D Convex Hulls Monday, 2/23/04.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 3 Chapter 4: 3D Convex Hulls Chapter.
Parts of Mortenson Chapter 6-9,
Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
Chapter 12 Surface Area and Volume. Topics We Will Discuss 3-D Shapes (Solids) Surface Area of solids Volume of Solids.
Chapter 12 Surface Area and Volume. Topics We Will Discuss 3-D Shapes (Solids) Surface Area of solids Volume of Solids.
Orthogonal Matrices and Spectral Representation In Section 4.3 we saw that n  n matrix A was similar to a diagonal matrix if and only if it had n linearly.
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)
1 February 24 Matrices 3.2 Matrices; Row reduction Standard form of a set of linear equations: Chapter 3 Linear Algebra Matrix of coefficients: Augmented.
1 Dr. Scott Schaefer Geometric Modeling CSCE 645/VIZA 675.
Vectors & Matrices Marq Singer
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Transformations Dr. Amy Zhang.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Elementary Linear Algebra Anton & Rorres, 9th Edition
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
Intro to 3D Models Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
12. Polyhedra
Geometric Camera Models
1 Dr. Scott Schaefer Geometric Modeling CSCE 645/VIZA 675.
Geometric Objects and Transformation
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Euler’s characteristic and the sphere
Solid Modeling. Solid Modeling - Polyhedron A polyhedron is a connected mesh of simple planar polygons that encloses a finite amount of space. A polyhedron.
Chapter 12.1 Notes Polyhedron – is a solid that is bounded by polygons, called faces, that enclose a single region of space. Edge – of a polygon is a line.
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.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness)
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 4: 3D Convex Hulls Thursday,
Affine Geometry.
Computer Graphics I, Fall 2010 Transformations.
4. Affine transformations. Reading Required:  Watt, Section 1.1. Further reading:  Foley, et al, Chapter  David F. Rogers and J. Alan Adams,
Unsupervised Learning II Feature Extraction
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Sect. 4.5: Cayley-Klein Parameters 3 independent quantities are needed to specify a rigid body orientation. Most often, we choose them to be the Euler.
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
Surface Area and Volume
Homogeneous Coordinates (Projective Space)
COMP 175: Computer Graphics February 9, 2016
Geometric Modeling CSCE 645/VIZA 675
Geometric Camera Models
2D Geometric Transformations
Surface Area and Volume
14 Chapter Area, Pythagorean Theorem, and Volume
Presentation transcript:

Geometric Modeling Mortenson Chapter 1 (including some material from Farin Ch. 2)

Vector Properties Vector: Magnitude: Direction cosines: scalar (dot) product: vector (cross) product: source: Mortenson

Matrix Properties Special square matrices: - Diagonal: 0 elements except on main diagonal - Identity matrix - Symmetric matrix: symmetric about main diagonal - Antisymmetric (skew symmetric): a ij = - a ji Transpose: A T (AA T ) T =AA T Inverse of square matrix: A -1 AA -1 = A -1 A= I Elements of A -1 : where |A’ ji | is determinant of cofactor that deletes row j and column i from A. Determinant properties: |A| - |A|= |A T | - |AB|= |A||B| source: Mortenson

Matrix Properties (continued) Eigenvalues and Eigenvectors: - Let p be a point and A be a transformation matrix. - Suppose that scalar exists such that: Ap= p. - Each vector for which Ap= p is true is an eigenvector of A. - Each scalar for which Ap= p is true is an eigenvalue of A corresponding to p. - Characteristic equation ( if ): |A- I |=0. Solutions are eigenvalues of A. - Finding eigenvectors: (see Introduction to Linear Algebra by Krause) -Theorem: A linear transformation has a diagonal matrix there is a basis of eigenvectors of that matrix. As we’ll see in Ch. 2 of Farin, a linear transformation preserves linear combinations: Also in Ch. 2 of Farin: Eigenvectors can be used to determine axes of norm ellipse for a 2D set of points whose centroid is at origin. Eigenvalues give lengths of ellipse’s axes. This helps to characterize the point set. sources: Mortenson, Farin

Matrix Properties (continued) source: Mortenson

Geometric Modeling Farin Chapters 2,3 (including some material from O’Rourke)

Points and Vectors Barycentric combination of points: Note: some  ’s may be negative. Example: “center of gravity” Special case: convex combination of points:  ’s must all be positive. Convex Hull of a set of points is the set of all convex combinations of points in the set. nonconvex polygon convex hull of a point set sources: Farin, O’Rourke

Barycentric Coordinates in the Plane source: Farin

Linear Interpolation source: Farin

Affine Maps A map  that maps E 3 into itself is an affine map if it leaves barycentric combinations invariant. So, if and  is an affine map, then Formulation for a point x in a coordinate system with a 3x3 matrix A and vector from R 3 : source: Farin

Affine Maps (continued) Examples of affine transformations (can be composed using matrix multiplication to form chains of transformations) –Identity: A = I and v = 0. x is unchanged. –Translation: A = I and v = translation vector. x is shifted by v. –Scaling: A is a diagonal matrix and v = 0. x is “stretched”. –Rotation: A is a rotation matrix (for rotation about an axis) and v = 0. x is rotated about the associated axis. –Shear: A is I with some 0 elements replaced by non-0 value(s). v = 0. Effect on x is like “tilting” an axis. –Parallel projection: center of projection is at infinity, so that there is a single viewing direction. Primary types are oblique and orthographic. Rigid Body Motions preserve lengths and angles. A T A = I. –Translations and Rotations are examples. source: Farin

Linear Interpolation Linear interpolation is affinely invariant : source: Farin

More on Affine Maps… Every map that takes straight lines to straight lines and is ratio preserving is an affine map. –For 3 collinear points: a, b, c: where vol 1 denotes one-dimensional volume. source: Farin

Function Spaces This material will simplify notation later. Let C [ a, b ] be set of all real-valued continuous functions defined over [ a, b ]. C [ a, b ] forms a linear space over the reals if –For n functions are linearly independent if source: Farin

Function Spaces (continued) Some useful subspaces of C [ a, b ]: –Polynomials of degree n : –Monomials are linearly independent and form a basis for the polynomials. –A linear transformation preserves linear combinations: –Piecewise linear functions over a fixed partition of [ a, b ]. Hat functions form a basis. source: Farin

Variation Diminishing Property source: Farin

Menelaos’ Theorem useful in proof of many algorithms source: Farin

Blossoms Example of a blossom : In general, a blossom is an n -variate function b[ t 1,…, t n ] from R n to E 2 or E 3 with properties: -Symmetry : -Multiaffinity : -Diagonality : where  denotes permutation where  indicates same arguments on both sides This determines a polynomial curve. Special case has Leibniz formula : where argument is repeated n times source: Farin

Common Computational Geometry Structures Voronoi Diagram Convex Hull New Point source: O’Rourke, Computational Geometry in C Delaunay Triangulation

Geometric Modeling OpenGL

OpenGL Overview Open-Source Graphics API Specification –Hardware-independent –Operating system independent –Vendor-neutral –Bindings for C and some other languages –Client/server paradigm Managed by OpenGL Architecture Review Board source:

OpenGL Graphics Pipeline source: store commands for later use evaluate polynomial functions transformation,lighting, clipping, projection, viewport selection produce fragments (series of framebuffer addresses and values) hidden surface removal via depth (z)-buffering stores pixel values for bit planes

Window and Viewport source: Hill / Kelley

OpenGL Overview State-Based: stacks maintain state –Push saves current state –Pop restores previous state –Matrix stack for transformations –Attribute stack for properties such as color source:

OpenGL Geometric Primitives source:on-line OpenGL Programming Guide (see course web site for link)

OpenGL GLU Evaluators for Curves and Surfaces source: Bezier curve with 4 control points wireframe Bezier surface lit, shaded Bezier surface using mesh NURBS surface

GL Utility Toolkit (GLUT) Event-driven, interactive windowing support –call-back functions

source:

OpenGL and GLUT part of HW#1 Starting point: articulated robot by Michelle Daniels

OpenGL and GLUT part of HW#1 Add some GLUT objects to the scene.

Geometric Modeling Polyhedra source: O’Rourke, Computational Geometry in C

Polyhedra: What are they? Polyhedron generalizes 2D polygon to 3D Consists of flat polygonal faces Boundary/surface contains –0D vertices1D edges2D faces Components intersect “properly.” Each face pair: –disjoint or have vertex in common or have vertex/edge/vertex in common Local topology is “proper” –at every point neighborhood is homeomorphic to disk Global topology is “proper” –connected, closed, bounded –may have holes not polyhedra! polyhedra for more examples, see

Polyhedra: Regular Polytopes Convex polyhedra are polytopes Regular polyhedra are polytopes that have: –regular faces, = faces, = solid (dihedral) angles There are exactly 5 regular polytopes Excellent math references by H.S.M. Coxeter: - Introduction to Geometry (2nd edition), Wiley &Sons, Regular Polytopes, Dover Publications, 1973 p v (p-2)(v-2) Name Description Tetrahedron 3 triangles at each vertex Cube 3 squares at each vertex Octahedron 4 triangles at each vertex Dodecahedron 3 pentagons at each vertex Icosahedron 5 triangles at each vertex

Polyhedra: Euler’s Formula Proof has 3 parts: 1) Convert polyhedron surface to planar graph 2) Tree theorem 3) Proof by induction V - E + F = 2

Polyhedral Boundary Representations winged edge f0f0f0f0 f1f1f1f1 e e1+e1+e1+e1+ e1-e1-e1-e1- e0+e0+e0+e0+ e0-e0-e0-e0- v1v1v1v1 v0v0v0v0 twin edge [ DCEL: doubly connected edge list ] f0f0f0f0 f1f1f1f1 e e 4,0 v1v1v1v1 v0v0v0v0 - focus is on edge - edge orientation is arbitrary - represent edge as 2 halves - lists: vertex, face, edge/twin - more storage space - facilitates face traversal - can represent holes with face inner/outer edge pointer e’s twin v2v2v2v2 v7v7v7v7 v6v6v6v6 v5v5v5v5 v3v3v3v3 v4v4v4v4 e 0,1

Polyhedral Boundary Representations: Quad-Edge - general: subdivision of oriented 2D manifold - edge record is part of: - endpoint 1 list - endpoint 2 list - face A list - face B list e 0,1 f0f0f0f0 f1f1f1f1 e 4,0 v1v1v1v1 v0v0v0v0 v2v2v2v2 v7v7v7v7 v6v6v6v6 v5v5v5v5 v3v3v3v3 v4v4v4v4 e 0,1 twin edge [DCEL: doubly connected edge list] e 0,0 e 1,0 e 2,0 e 3,0 e 5,1 e 6,1 e 7,1 e 1,1 e 5,1 e 6,1 e 7,1 e 1,0 e 0,0 e 2,0 e 3,0 e 4,0 e 1,1