Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Geometric Modeling 91.580.201 Mortenson Chapter 1 (including some material from Farin Ch. 2)"— Presentation transcript:

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

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

3 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

4 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

5 Matrix Properties (continued) source: Mortenson

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

7 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

8 Barycentric Coordinates in the Plane source: Farin

9 Linear Interpolation source: Farin

10 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

11 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

12 Linear Interpolation Linear interpolation is affinely invariant : source: Farin

13 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

14 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

15 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

16 Variation Diminishing Property source: Farin

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

18 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

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

20 Geometric Modeling 91.580.201 OpenGL

21 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:http://web.cs.wpi.edu/~matt/courses/cs563/talks/OpenGL_Presentation/OpenGL_Presentation.html

22 OpenGL Graphics Pipeline source:http://web.cs.wpi.edu/~matt/courses/cs563/talks/OpenGL_Presentation/OpenGL_Presentation.html 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

23 Window and Viewport source: Hill / Kelley

24 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:http://web.cs.wpi.edu/~matt/courses/cs563/talks/OpenGL_Presentation/OpenGL_Presentation.html

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

26 OpenGL GLU Evaluators for Curves and Surfaces source:http://hal.chem.uwm.edu/library/SGI_bookshelves/SGI_Developer/books/OpenGL_PG/sgi_html/ch13.html Bezier curve with 4 control points wireframe Bezier surface lit, shaded Bezier surface using mesh NURBS surface

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

28 source:http://www.avl.iu.edu/~ewernert/b581/lectures/12.1/index.html

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

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

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

32 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 http://www.ScienceU.com/geometry/facts/solids/handson.html

33 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, 1969 - Regular Polytopes, Dover Publications, 1973 p v (p-2)(v-2) Name Description 3 3 1 Tetrahedron 3 triangles at each vertex 4 3 2 Cube 3 squares at each vertex 3 4 2 Octahedron 4 triangles at each vertex 5 3 3 Dodecahedron 3 pentagons at each vertex 3 5 3 Icosahedron 5 triangles at each vertex

34 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

35 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

36 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


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

Similar presentations


Ads by Google