3 Linear Transformations of the Plane

Total Page:16

File Type:pdf, Size:1020Kb

3 Linear Transformations of the Plane 3 Linear Transformations of the Plane Now that we're using matrices to represent linear transformations, we'll find ourselves en- countering a wide range of transformations and matrices; it can become difficult to keep track of which transformations do what. In these notes we'll develop a tool box of basic transformations which can easily be remembered by their geometric properties. We'll focus on linear transformations T : R2 ! R2 of the plane to itself, and thus on the 2 × 2 matrices A corresponding to these transformation. Perhaps the most important fact to keep in mind as we determine the matrices corresponding to different transformations is that the first and second columns of A are given by T (e1) and T (e2), respectively, where e1 2 and e2 are the standard unit vectors in R . 3.1 Scaling The first transformation of R2 that we want to consider is that of scaling every vector by some factor k. That is, T (x) = kx for every x 2 R2. If k = 1, then T does nothing. In this case, T (e1) = e1 and T (e2) = e2, so the columns of the corresponding matrix A are e1 and e2: 1 0 A = : 0 1 We call this the identity matrix (of size 2) and denote it either as I2 or as I when the size is obvious. For any other scale factor k we have k 0 T (e ) = and T (e ) = ; 1 0 2 k so the corresponding matrix is given by k 0 A = : 0 k Now suppose we have two scaling maps: T1 which scales by a factor of k1, and T2 which scales by a factor of k2. Then T2 ◦ T1 is the transformation that scales by a factor of k1 and then by k2, which is to say that it scales by a factor of k2k1. This means that its matrix representation should be given by k k 0 A = 2 1 ; 0 k2k1 and indeed we can easily check that k2 0 k1 0 k2k1 0 A2A1 = = = A: 0 k2 0 k1 0 k2k1 This agrees with our notion of matrix multiplication representing composition of linear trans- formations. 15 Figure 2: Orthogonal projection of v onto w. 3.2 Orthogonal Projection The next linear transformation we'd like to consider is that of projecting vectors onto a line in R2. First we have to consider what it means to project one vector onto another. Take a look at Figure2, where we're projecting the vector v onto w orthogonally. What we mean by orthogonal projection is that the displacement vector projw v − v is orthogonal to the vector w, as seen in Figure2. We can see that projw v will be a scalar multiple of w, so let's write projw v = kw. Since we require that projw v − v be orthogonal to w, we have (kw − v) · w = 0: That is, kw · w − v · w = 0; so v · w k = : w · w This means that we have v · w proj v = w: w w · w Now notice that if we project v onto any vector which is a nonzero scalar multiple of w, the resulting vector will be the same as projw v. So really we're projecting v onto the line L determined by w. For this reason, we write projL v for the projection of v onto the line L. Given a line L, we can compute projL v by first selecting a unit vector u = hu1; u2i through which L passes and then projecting v onto u. We then have 2 e1 · u u1 u1 projL(e1) = proju(e1) = u = u = u · u 1 u1u2 and e2 · u u2 u1u2 projL(e2) = proju(e2) = u = u = 2 ; u · u 1 u2 16 Figure 3: Rotation by θ. so the matrix A corresponding to the projection onto L is 2 u1 u1u2 A = 2 : u1u2 u2 As before, there's a matrix product that's worth considering here. If we apply the transfor- mation of projecting onto L twice, this should be no different than applying it once. After the first projection, all the vectors in R2 have been mapped onto L, and projecting a vector on L onto L does nothing. This is borne out by the fact that 2 2 2 2 u1 u1u2 u1 u1u2 u1 u1u2 A = 2 2 = 2 = A: u1u2 u2 u1u2 u2 u1u2 u2 We can also verify our claim that projecting a vector which already lies on L onto L does nothing: 3 2 2 2 ku1 ku1 + ku1u2 ku1(u1 + u2) ku1 A = 2 3 = 2 2 = ; ku2 ku1u2 + ku2 ku2(u1 + u2) ku2 where we using the fact that any vector on L has the form hku1; ku2i for some k. 3.3 Rotation Next we'll consider rotating the plane through some angle θ, as depicted in Figure3. Because the vector e1 lies on the unit circle, so does T (e1), and T (e1) makes an angle of θ with the x-axis. As a result, its x- and y-components are cos θ and sin θ, respectively: cos θ T (e ) = : 1 sin θ At the same time, since e2 makes an angle of π=2 with e1, the vectors T (e2) and T (e1) should also have an angle of π=2 between them. So the x- and y-components of T (e2) are 17 Figure 4: Reflection across a line. cos(θ + π=2) and sin(θ + π=2), respectively: cos(θ + π=2) − sin θ T (e ) = = : 2 sin(θ + π=2) cos θ So the matrix corresponding to rotation by θ is cos θ − sin θ A = : sin θ cos θ If we let Aθ and Aα be the matrices corresponding to rotation through an angle θ and an angle α, respectively, then one can compute (using angle-addition identities) that cos(θ + α) − sin(θ + α) A A = ; θ α sin(θ + α) cos(θ + α) which is the matrix corresponding to rotation through the angle θ + α. 3.4 Reflection Next we'll consider the linear transformation that reflects vectors across a line L that makes an angle θ with the x-axis, as seen in Figure4. Computing T (e1) isn't that bad: since L makes an angle θ with the x-axis, T (e1) should make an angle θ with L, and thus an angle 2θ with the x-axis. So cos 2θ T (e ) = : 1 sin 2θ Determining T (e2) is only slightly less straightforward. First, e2 makes an angle of π=2 − θ with L, so T (e2) should make the same angle with L, but on the other side of the line. Since there's an angle of θ between the x-axis and L, the angle between T (e2) and the x-axis is π=2 − 2θ. (We're assuming that 0 ≤ θ ≤ π=2, but similar computations can be done for 18 Figure 5: A horizontal shear. other values of θ.) Of course, this angle is in the clockwise direction from the x-axis, so we have cos(−(π=2 − 2θ)) cos(2θ − π=2) sin 2θ T (e ) = = = : 2 sin(−(π=2 − 2θ)) sin(2θ − π=2) − cos 2θ Altogether, the matrix for reflecting across L is cos 2θ sin 2θ A = : sin 2θ − cos 2θ Notice that cos 2θ sin 2θ cos 2θ sin 2θ A2 = sin 2θ − cos 2θ sin 2θ − cos 2θ cos2 2θ + sin2 2θ cos 2θ sin 2θ − cos 2θ sin 2θ = = I ; cos 2θ sin 2θ − cos 2θ sin 2θ sin2 2θ + cos2 2θ 2 indicative of the fact that reflecting across L twice does nothing. 3.5 Shearing The last linear transformation we'll consider is that of shearing. Consider Figure5, where we are mapping the standard basis vectors (which are blue) to the orange vectors shown. This is a horizontal shear, where the vector h1; 0i pointing in the x-direction is fixed, but the vector h0; 1i pointing in the y-direction is taken to the vector hk; 1i, where k is some real number. Notice that if k > 0, then our horizontal shear pushes the top of the blue parallelogram to the right, resulting in the orange parallelogram shown. If k < 0, then we push the top of the blue parallelogram to the left. It is easy to see from the definition of this horizontal shear that the corresponding matrix is 1 k A = : 0 1 19 On the other hand, a vertical shear (not shown) would fix h0; 1i and would push the y- component of the vector h1; 0i up k units to the vector h1; ki. So the matrix for a vertical shear is 1 0 A = : k 1 Notice that if we apply a horizontal shear with factor k1 and then another horizontal shear with k2, this is the same as shearing with factor k1 + k2. This is borne out by the fact that 1 k 1 k 1 k + k 2 1 = 1 2 : 0 1 0 1 0 1 In particular, shearing to the left by k is undone by shearing to the right by −k: 1 −k 1 k 1 0 = : 0 1 0 1 0 1 So horizontal shears are invertible. A similar product holds for vertical shears (prove it!). Example 12. (x2.2, Exercise 27 of [1]) Consider the matrices A through E below. 0:6 0:8 3 0 0:36 −0:48 A = , B = , C = 0:8 −0:6 0 3 −0:48 0:64 −0:8 0:6 1 0 D = , E = .
Recommended publications
  • Projective Geometry: a Short Introduction
    Projective Geometry: A Short Introduction Lecture Notes Edmond Boyer Master MOSIG Introduction to Projective Geometry Contents 1 Introduction 2 1.1 Objective . .2 1.2 Historical Background . .3 1.3 Bibliography . .4 2 Projective Spaces 5 2.1 Definitions . .5 2.2 Properties . .8 2.3 The hyperplane at infinity . 12 3 The projective line 13 3.1 Introduction . 13 3.2 Projective transformation of P1 ................... 14 3.3 The cross-ratio . 14 4 The projective plane 17 4.1 Points and lines . 17 4.2 Line at infinity . 18 4.3 Homographies . 19 4.4 Conics . 20 4.5 Affine transformations . 22 4.6 Euclidean transformations . 22 4.7 Particular transformations . 24 4.8 Transformation hierarchy . 25 Grenoble Universities 1 Master MOSIG Introduction to Projective Geometry Chapter 1 Introduction 1.1 Objective The objective of this course is to give basic notions and intuitions on projective geometry. The interest of projective geometry arises in several visual comput- ing domains, in particular computer vision modelling and computer graphics. It provides a mathematical formalism to describe the geometry of cameras and the associated transformations, hence enabling the design of computational ap- proaches that manipulates 2D projections of 3D objects. In that respect, a fundamental aspect is the fact that objects at infinity can be represented and manipulated with projective geometry and this in contrast to the Euclidean geometry. This allows perspective deformations to be represented as projective transformations. Figure 1.1: Example of perspective deformation or 2D projective transforma- tion. Another argument is that Euclidean geometry is sometimes difficult to use in algorithms, with particular cases arising from non-generic situations (e.g.
    [Show full text]
  • Scaling Algorithms and Tropical Methods in Numerical Matrix Analysis
    Scaling Algorithms and Tropical Methods in Numerical Matrix Analysis: Application to the Optimal Assignment Problem and to the Accurate Computation of Eigenvalues Meisam Sharify To cite this version: Meisam Sharify. Scaling Algorithms and Tropical Methods in Numerical Matrix Analysis: Application to the Optimal Assignment Problem and to the Accurate Computation of Eigenvalues. Numerical Analysis [math.NA]. Ecole Polytechnique X, 2011. English. pastel-00643836 HAL Id: pastel-00643836 https://pastel.archives-ouvertes.fr/pastel-00643836 Submitted on 24 Nov 2011 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Th`esepr´esent´eepour obtenir le titre de DOCTEUR DE L'ECOLE´ POLYTECHNIQUE Sp´ecialit´e: Math´ematiquesAppliqu´ees par Meisam Sharify Scaling Algorithms and Tropical Methods in Numerical Matrix Analysis: Application to the Optimal Assignment Problem and to the Accurate Computation of Eigenvalues Jury Marianne Akian Pr´esident du jury St´ephaneGaubert Directeur Laurence Grammont Examinateur Laura Grigori Examinateur Andrei Sobolevski Rapporteur Fran¸coiseTisseur Rapporteur Paul Van Dooren Examinateur September 2011 Abstract Tropical algebra, which can be considered as a relatively new field in Mathemat- ics, emerged in several branches of science such as optimization, synchronization of production and transportation, discrete event systems, optimal control, oper- ations research, etc.
    [Show full text]
  • THESIS MULTIDIMENSIONAL SCALING: INFINITE METRIC MEASURE SPACES Submitted by Lara Kassab Department of Mathematics in Partial Fu
    THESIS MULTIDIMENSIONAL SCALING: INFINITE METRIC MEASURE SPACES Submitted by Lara Kassab Department of Mathematics In partial fulfillment of the requirements For the Degree of Master of Science Colorado State University Fort Collins, Colorado Spring 2019 Master’s Committee: Advisor: Henry Adams Michael Kirby Bailey Fosdick Copyright by Lara Kassab 2019 All Rights Reserved ABSTRACT MULTIDIMENSIONAL SCALING: INFINITE METRIC MEASURE SPACES Multidimensional scaling (MDS) is a popular technique for mapping a finite metric space into a low-dimensional Euclidean space in a way that best preserves pairwise distances. We study a notion of MDS on infinite metric measure spaces, along with its optimality properties and goodness of fit. This allows us to study the MDS embeddings of the geodesic circle S1 into Rm for all m, and to ask questions about the MDS embeddings of the geodesic n-spheres Sn into Rm. Furthermore, we address questions on convergence of MDS. For instance, if a sequence of metric measure spaces converges to a fixed metric measure space X, then in what sense do the MDS embeddings of these spaces converge to the MDS embedding of X? Convergence is understood when each metric space in the sequence has the same finite number of points, or when each metric space has a finite number of points tending to infinity. We are also interested in notions of convergence when each metric space in the sequence has an arbitrary (possibly infinite) number of points. ii ACKNOWLEDGEMENTS We would like to thank Henry Adams, Mark Blumstein, Bailey Fosdick, Michael Kirby, Henry Kvinge, Facundo Mémoli, Louis Scharf, the students in Michael Kirby’s Spring 2018 class, and the Pattern Analysis Laboratory at Colorado State University for their helpful conversations and support throughout this project.
    [Show full text]
  • Communication-Optimal Parallel 2.5D Matrix Multiplication and LU Factorization Algorithms
    Introduction 2.5D matrix multiplication 2.5D LU factorization Conclusion Communication-optimal parallel 2.5D matrix multiplication and LU factorization algorithms Edgar Solomonik and James Demmel UC Berkeley September 1st, 2011 Edgar Solomonik and James Demmel 2.5D algorithms 1/ 36 Introduction 2.5D matrix multiplication 2.5D LU factorization Conclusion Outline Introduction Strong scaling 2.5D matrix multiplication Strong scaling matrix multiplication Performing faster at scale 2.5D LU factorization Communication-optimal LU without pivoting Communication-optimal LU with pivoting Conclusion Edgar Solomonik and James Demmel 2.5D algorithms 2/ 36 Introduction 2.5D matrix multiplication Strong scaling 2.5D LU factorization Conclusion Solving science problems faster Parallel computers can solve bigger problems I weak scaling Parallel computers can also solve a xed problem faster I strong scaling Obstacles to strong scaling I may increase relative cost of communication I may hurt load balance Edgar Solomonik and James Demmel 2.5D algorithms 3/ 36 Introduction 2.5D matrix multiplication Strong scaling 2.5D LU factorization Conclusion Achieving strong scaling How to reduce communication and maintain load balance? I reduce communication along the critical path Communicate less I avoid unnecessary communication Communicate smarter I know your network topology Edgar Solomonik and James Demmel 2.5D algorithms 4/ 36 Introduction 2.5D matrix multiplication Strong scaling matrix multiplication 2.5D LU factorization Performing faster at scale Conclusion
    [Show full text]
  • Affine Transformations  Foley, Et Al, Chapter 5.1-5.5
    Reading Optional reading: Angel 4.1, 4.6-4.10 Angel, the rest of Chapter 4 Affine transformations Foley, et al, Chapter 5.1-5.5. David F. Rogers and J. Alan Adams, Mathematical Elements for Computer Graphics, 2nd Ed., McGraw-Hill, New York, Daniel Leventhal 1990, Chapter 2. Adapted from Brian Curless CSE 457 Autumn 2011 1 2 Linear Interpolation More Interpolation 3 4 1 Geometric transformations Vector representation Geometric transformations will map points in one We can represent a point, p = (x,y), in the plane or space to points in another: (x', y‘, z‘ ) = f (x, y, z). p=(x,y,z) in 3D space These transformations can be very simple, such as column vectors as scaling each coordinate, or complex, such as non-linear twists and bends. We'll focus on transformations that can be represented easily with matrix operations. as row vectors 5 6 Canonical axes Vector length and dot products 7 8 2 Vector cross products Inverse & Transpose 9 10 Two-dimensional Representation, cont. transformations We can represent a 2-D transformation M by a Here's all you get with a 2 x 2 transformation matrix matrix M: If p is a column vector, M goes on the left: So: We will develop some intimacy with the If p is a row vector, MT goes on the right: elements a, b, c, d… We will use column vectors. 11 12 3 Identity Scaling Suppose we choose a=d=1, b=c=0: Suppose we set b=c=0, but let a and d take on any positive value: Gives the identity matrix: Gives a scaling matrix: Provides differential (non-uniform) scaling in x and y: Doesn't move the points at all 1 2 12 x y 13 14 ______________ ____________ Suppose we keep b=c=0, but let either a or d go Now let's leave a=d=1 and experiment with b.
    [Show full text]
  • 1 Review of Inner Products 2 the Approximation Problem and Its Solution Via Orthogonality
    Approximation in inner product spaces, and Fourier approximation Math 272, Spring 2018 Any typographical or other corrections about these notes are welcome. 1 Review of inner products An inner product space is a vector space V together with a choice of inner product. Recall that an inner product must be bilinear, symmetric, and positive definite. Since it is positive definite, the quantity h~u;~ui is never negative, and is never 0 unless ~v = ~0. Therefore its square root is well-defined; we define the norm of a vector ~u 2 V to be k~uk = ph~u;~ui: Observe that the norm of a vector is a nonnegative number, and the only vector with norm 0 is the zero vector ~0 itself. In an inner product space, we call two vectors ~u;~v orthogonal if h~u;~vi = 0. We will also write ~u ? ~v as a shorthand to mean that ~u;~v are orthogonal. Because an inner product must be bilinear and symmetry, we also obtain the following expression for the squared norm of a sum of two vectors, which is analogous the to law of cosines in plane geometry. k~u + ~vk2 = h~u + ~v; ~u + ~vi = h~u + ~v; ~ui + h~u + ~v;~vi = h~u;~ui + h~v; ~ui + h~u;~vi + h~v;~vi = k~uk2 + k~vk2 + 2 h~u;~vi : In particular, this gives the following version of the Pythagorean theorem for inner product spaces. Pythagorean theorem for inner products If ~u;~v are orthogonal vectors in an inner product space, then k~u + ~vk2 = k~uk2 + k~vk2: Proof.
    [Show full text]
  • A Geometric Model of Allometric Scaling
    1 Site model of allometric scaling and fractal distribution networks of organs Walton R. Gutierrez* Touro College, 27West 23rd Street, New York, NY 10010 *Electronic address: [email protected] At the basic geometric level, the distribution networks carrying vital materials in living organisms, and the units such as nephrons and alveoli, form a scaling structure named here the site model. This unified view of the allometry of the kidney and lung of mammals is in good agreement with existing data, and in some instances, improves the predictions of the previous fractal model of the lung. Allometric scaling of surfaces and volumes of relevant organ parts are derived from a few simple propositions about the collective characteristics of the sites. New hypotheses and predictions are formulated, some verified by the data, while others remain to be tested, such as the scaling of the number of capillaries and the site model description of other organs. I. INTRODUCTION Important Note (March, 2004): This article has been circulated in various forms since 2001. The present version was submitted to Physical Review E in October of 2003. After two rounds of reviews, a referee pointed out that aspects of the site model had already been discovered and proposed in a previous article by John Prothero (“Scaling of Organ Subunits in Adult Mammals and Birds: a Model” Comp. Biochem. Physiol. 113A.97-106.1996). Although modifications to this paper would be required, it still contains enough new elements of interest, such as (P3), (P4) and V, to merit circulation. The q-bio section of www.arxiv.org may provide such outlet.
    [Show full text]
  • Eigenvalues, Eigenvectors and the Similarity Transformation
    Eigenvalues, Eigenvectors and the Similarity Transformation Eigenvalues and the associated eigenvectors are ‘special’ properties of square matrices. While the eigenvalues parameterize the dynamical properties of the system (timescales, resonance properties, amplification factors, etc) the eigenvectors define the vector coordinates of the normal modes of the system. Each eigenvector is associated with a particular eigenvalue. The general state of the system can be expressed as a linear combination of eigenvectors. The beauty of eigenvectors is that (for square symmetric matrices) they can be made orthogonal (decoupled from one another). The normal modes can be handled independently and an orthogonal expansion of the system is possible. The decoupling is also apparent in the ability of the eigenvectors to diagonalize the original matrix, A, with the eigenvalues lying on the diagonal of the new matrix, . In analogy to the inertia tensor in mechanics, the eigenvectors form the principle axes of the solid object and a similarity transformation rotates the coordinate system into alignment with the principle axes. Motion along the principle axes is decoupled. The matrix mechanics is closely related to the more general singular value decomposition. We will use the basis sets of orthogonal eigenvectors generated by SVD for orbit control problems. Here we develop eigenvector theory since it is more familiar to most readers. Square matrices have an eigenvalue/eigenvector equation with solutions that are the eigenvectors xand the associated eigenvalues : Ax = x The special property of an eigenvector is that it transforms into a scaled version of itself under the operation of A. Note that the eigenvector equation is non-linear in both the eigenvalue () and the eigenvector (x).
    [Show full text]
  • • Rotations • Camera Calibration • Homography • Ransac
    Agenda • Rotations • Camera calibration • Homography • Ransac Geometric Transformations y 164 Computer Vision: Algorithms andx Applications (September 3, 2010 draft) Transformation Matrix # DoF Preserves Icon translation I t 2 orientation 2 3 h i ⇥ ⇢⇢SS rigid (Euclidean) R t 3 lengths S ⇢ 2 3 S⇢ ⇥ h i ⇢ similarity sR t 4 angles S 2 3 S⇢ h i ⇥ ⇥ ⇥ affine A 6 parallelism ⇥ ⇥ 2 3 h i ⇥ projective H˜ 8 straight lines ` 3 3 ` h i ⇥ Table 3.5 Hierarchy of 2D coordinate transformations. Each transformation also preserves Let’s definethe properties families listed of in thetransformations rows below it, i.e., similarity by the preserves properties not only anglesthat butthey also preserve parallelism and straight lines. The 2 3 matrices are extended with a third [0T 1] row to form ⇥ a full 3 3 matrix for homogeneous coordinate transformations. ⇥ amples of such transformations, which are based on the 2D geometric transformations shown in Figure 2.4. The formulas for these transformations were originally given in Table 2.1 and are reproduced here in Table 3.5 for ease of reference. In general, given a transformation specified by a formula x0 = h(x) and a source image f(x), how do we compute the values of the pixels in the new image g(x), as given in (3.88)? Think about this for a minute before proceeding and see if you can figure it out. If you are like most people, you will come up with an algorithm that looks something like Algorithm 3.1. This process is called forward warping or forward mapping and is shown in Figure 3.46a.
    [Show full text]
  • Scaling Symmetry Meets Topology ⇑ Pengfei Zhang, Hui Zhai
    Science Bulletin 64 (2019) 289–290 Contents lists available at ScienceDirect Science Bulletin journal homepage: www.elsevier.com/locate/scib Research Highlight Scaling symmetry meets topology ⇑ Pengfei Zhang, Hui Zhai Institute for Advanced Study, Tsinghua University, Beijing 100084, China In 1970, Vitaly Efimov found an interesting phenomenon in a also been proposed and observed in ultracold atomic gases [7]. quantum three-body problem, which is now known as the Efimov Very recently, it has also been pointed out that the Efimov effect effect [1]. Efimov found that when the two-body interaction poten- can be linked to the fractal behavior in the time domain [8,9]. Nev- tial is short-ranged and is tuned to the vicinity of an s-wave reso- ertheless, these studies have so far been limited to atomic and nance, an infinite number of three-body bound states emerge and nuclear systems. The recently published experiment by Wang their eigenenergies En form a geometric sequence as et al. [12] brings the Efimov physics into condensed matter system En ¼jE0j expð2pn=s0Þ, where s0 is a universal constant. This by observing such a universal discrete scaling symmetry in the effect is directly related to a symmetry called the scaling symme- topological semi-metals. The topological semi-metal has received try. In short, the three-body problem with a resonant two-body considerable attentions in the past decades. The interplay between interacting potential can be reduced to the following one-dimen- this discrete scaling symmetry and topology introduces a new sional Schrödinger equation as twist to the physics of topological material and will make its ! physics even richer.
    [Show full text]
  • Computer Graphics Programming: Matrices and Transformations Outline
    Computer Graphics Programming: Matrices and Transformations Outline • Computer graphics overview • Object /Geometry modlideling • 2D modeling transformations and matrices • 3D modeling transformations and matrices • Relevant Unity scripting features Computer Graphics • Algorithmically generating a 2D image from 3D data (models, textures, lighting) • Also called rendering • Raster graphics – Array of pixels – About 25x25 in the example ‐> • Algorithm tradeoffs: – Computation time – Memory cost – Image quality Computer Graphics • The graphics pipeline is a series of conversions of points into different coordinate systems or spaces Computer Graphics • Virtual cameras in Unity will handle everything from the viewing transformation on OpenGL specifying geometry Legacy syntax example: glBegin(GL_POLYGON); glVertex2f(-0.5, -0.5); glVertex2f(-0.5, 0.5); glVertex2f(0. 5, 05);0.5); glVertex2f(0.5, -0.5); glEnd(); Unity specifying geometry – Mesh class • Requires two types of values – Vertices (specified as an array of 3D points) – Triangles (specified as an array of Vector3s whose values are indices in the vertex array) • Documentation and Example – http://docs.unityy/3d.com/Documentation ///Manual/Ge neratingMeshGeometryProcedurally.html – http://docs.unity3d.com/Documentation/ScriptRefere nce/Mesh.html • The code on the following slides is attached to a cube game object (rather than an EmptyObject) Mesh pt. 1 – assign vertices Mesh mesh = new Mesh(); gameObject.GetComponent<MeshFilter>().mesh = mesh; Vector3[] vertices = new Vector3[4]; vertices[0]
    [Show full text]
  • Math 535 - General Topology Additional Notes
    Math 535 - General Topology Additional notes Martin Frankland September 5, 2012 1 Subspaces Definition 1.1. Let X be a topological space and A ⊆ X any subset. The subspace topology sub on A is the smallest topology TA making the inclusion map i: A,! X continuous. sub In other words, TA is generated by subsets V ⊆ A of the form V = i−1(U) = U \ A for any open U ⊆ X. Proposition 1.2. The subspace topology on A is sub TA = fV ⊆ A j V = U \ A for some open U ⊆ Xg: In other words, the collection of subsets of the form U \ A already forms a topology on A. 2 Products Before discussing the product of spaces, let us review the notion of product of sets. 2.1 Product of sets Let X and Y be sets. The Cartesian product of X and Y is the set of pairs X × Y = f(x; y) j x 2 X; y 2 Y g: It comes equipped with the two projection maps pX : X × Y ! X and pY : X × Y ! Y onto each factor, defined by pX (x; y) = x pY (x; y) = y: This explicit description of X × Y is made more meaningful by the following proposition. 1 Proposition 2.1. The Cartesian product of sets satisfies the following universal property. For any set Z along with maps fX : Z ! X and fY : Z ! Y , there is a unique map f : Z ! X × Y satisfying pX ◦ f = fX and pY ◦ f = fY , in other words making the diagram Z fX 9!f fY X × Y pX pY { " XY commute.
    [Show full text]