2D and 3D Transformations AUI Course Denbigh Starkey
|
|
- Cornelia Cunningham
- 5 years ago
- Views:
Transcription
1 2D and 3D Transformations AUI Course Denbigh Starkey. Introduction D transformations using Cartesian coordinates 3 2. Translation Rotation Scaling 6 3. Introduction to homogeneous coordinates D transformations using homogeneous coordinates 5. Rotations and scaling relative to a fixed point 2 6. Comparison of Cartesian and homogeneous approaches D transformations using homogeneous coordinates 6 8. Example 9
2 . Introduction The three most important transformations, translation, rotation, and scaling, are the most common operations performed in computer graphics, and so doing them efficiently and effectively is critical. I ll have two sets of notes related to these operations, this page and a page on using quaternions for rotations about arbitrary axes which I ll cover later. So in these notes I ll discuss three types of transformations, translations, rotations, and scaling. All three are affine transformations, which means that if they are applied to a straight line then the result is still straight. So to transform an object that is polygonal all we have to do is the transform the finite number of vertices (control points and then redraw the lines or polygons. Affine transformations also preserve spline curves and surfaces, which I ll be covering later in this course, and so when transforming splines we also only have to transform the control points that define the curves and surfaces. The biggest complication when dealing with these transformations is that to do them efficiently we need to use a whole new coordinate system. You ve been using Cartesian coordinates for years, and are probably happy with them, but as I ll show in these notes using homogeneous coordinates where, for example, a 2D point is represented with three components, is much more efficient. The basic approach is that I ll first use Cartesian coordinates for 2D transformations, and will then introduce and use 2D homogeneous coordinates. This lets me compare the two approaches in the simpler 2D case. Then having shown how much better the homogeneous coordinates are I ll use them for 3D transformations, which are obviously most common in graphics. I ll finish up with an example. There are other types of affine transformations which I won t cover because they are less important. In particular I won t cover shears. 2
3 2D transformations using Cartesian Coordinates 2. Translation Translation shifts an object in space without changing its size or orientation. I.e., it adds a fixed (δx, δy to every control point. In equation terms, for every point P = (x, y we get a new point P = (x, y, where we can either say P = (δx, δy + P if we are comfortable with point arithmetic, or x = δx + x y = δy + y using more traditional equations. If we move to vector notation, the points P and P are defined by & x P = % y & x ' and P =. % y' Then we can write &' x P = %' y + P or P = T + P where T is the column vector of δ s. E.g., if we have a simple house as shown below 3
4 & 2 and we translate by (2,, then the vector will be added to each of the % five control points (vertices to get The dotted lines show the original house and the solid lines the transformed house. 2.2 Rotation For rotations we need a little bit of trigonometry. The convention in graphics is that rotations are specified counterclockwise (ccw. In the picture below we have the original point P which is rotated θ (degrees, 4
5 radians, or whatever around the origin. So this gives a new point, P, which will be the same distance from the origin. Call that distance, the radius of the sweep, R. y P = (x, y R R sin(θ + φ θ φ R R cos(θ + φ R cos(φ P = (x, y R sin(φ x Now to do the math, we need to know the original angle between the line from the origin to P and the x axis. Call that φ as shown. Basic trigonometry tells us that and x = R cos(φ ( y = R sin(φ (2 x = R cos(φ + θ = R cos(φ cos(θ R sin(φ sin(θ (3 y = R sin(φ + θ = R cos(φ sin(θ + R sin(φ cos(θ (4 We can now use the substitutions from ( and (2 to get rid of the R and φ in (3 and (4 to get: x = x cos(θ y sin(θ y = x sin(θ + y cos(θ In matrix terms, cos( P = R P, where R = sin( sin( % cos( % 5
6 E.g., if we want to rotate our standard house 9 (reminder: cos(9 = and sin(9 = we will get expressions of the form: P = P. E.g., looking at the house corner at (3,, P = & 3 &' = % % 3 says that the new point corresponding to (3, is (-, 3. In the figure below I have shown this 9 ccw rotation with two lines to make the rotation a bit more clear. Obviously one possible surprise is that the house has swung away from its original location because we are rotating around the origin. We will deal with this problem later when we learn how to rotate around a fixed point in the figure (e.g., the lower left corner or the center of gravity of the house. 2.3 Scaling Scaling lets the user stretch or squash the object in both the x and y directions. E.g., one might want to double the width of the object and have 6
7 2 3 of the height, which would be a scale of (2, 32. Mathematically scaling is defined as: x = S x * x y = S y * y where S x and S y are the scaling factors, and (S x, S y is the scale. In matrix terms, P = S P Sx where S = Sy. E.g., applying the (2, 32 scale that I discussed above to the standard house, we get the picture below. Note that the house has also shifted right and down because of the scale. We can avoid this by fixing a point (e.g., the lower left and I ll look at how to do this later. If the scaling factors are equal (i.e., S x = S y then the scale is called uniform. As the above examples show, non-uniform scaling leads to distortion of the shape of the object. There are many times when we use non-uniform scaling. E.g. if we have a model of a house and we want to create a street of houses that all look 7
8 somewhat different then we can scale the basic house in different ways and drop each new house onto lots down the street. If one of the scaling factors is zero, then the object is projected (squashed down onto the opposite axis. E.g., if we apply S x = and S y = to the house then the result will be the line on the y axis shown as the wider line below: 8
9 3. Introduction to Homogeneous Coordinates A 2D homogeneous coordinate is a triple (x, y, w where w. It is the x y same point as the Cartesian coordinate,. So to convert a w w homogeneous coordinate to its Cartesian coordinate, just divide the first two components by the third component, which is called the weight. E.g., the four homogeneous coordinates (2, -3,, (-2, 3, -, (2, -3,, and (-,.5, -.5 all represent the same point, which in Cartesian coordinates is the point (2, -3. When doing transformations we will only use homogeneous points where the weight is. So any Cartesian point (x, y will be represented by the homogeneous point (x, y,. This might seem to give no benefits, but as we will see we can use this extra to greatly increase the efficiency of computing transformations. Projections, which I won t be covering, use general homogeneous coordinates where w. 9
10 4. 2D Transformations Using Homogeneous Coordinates Any points P and P will now have the vector form P = % & y x and P = % & ' ' y x. It is easy to confirm that the equations for 2D translate, rotate, and scale can be written as Translate: P = y x P Rotate: P = sin( cos( cos( sin( P Scale: P = Sx Sy P E.g., if we want to translate by (2, then we will compute: % & ' ' y x = 2 % & y x, which, when we multiply the two matrices on the right, gives the three equations x = x + 2, y = y +, and =,
11 which are the points that we want. So far we seem to have lost when going from Cartesian to homogeneous, since we have traded 22 matrix multiplications for 33 multiplications when doing rotation or scaling, and have traded a two element vector addition for a 33 matrix multiplication when translating. However, as we will see below, having all three operations as multiplications lets us create a combined transformation matrix for a sequence of operations, instead of having to do them one at a time, and this is what gives the homogeneous approach its efficiency. Before we do the comparison we ll first look at how to stop objects flying away by doing rotation and scaling with a fixed point.
12 5. Rotations and Scaling Relative to a Fixed Point Say we want to take our standard house and rotate it 9 around its lower left hand corner, which is at (, Cartesian. I.e., we want to produce the house shown below: We will do this with three steps. First we ll translate the house so that its lower left hand corner is at the origin, which is a translation of (-, -, then we ll do the 9 rotation, where the lower left hand corner will be fixed at the origin, and then finally we ll translate it back so that the lower left hand corner is back at (,, which is a translation of (,. I.e., we ll compute which is P = P P = T(, R(9 T(-, - P. Note that the order of the three operations is Right Left since first T(-, - is applied to P, then R(9, then T(,. In general, if we want to rotate by θ fixing the point (x, y we need the computation P = T(x, y R(θ T(-x, -y P. 2
13 We can do the same sort of thing when scaling and fixing a point. E.g., say we want to do the scale by (2, 32 that we showed earlier, but we now want to fix the center of the house, which is at (2, 2. I.e., we d like to produce the scale shown below: To do this we just use P = T(2, 2 S(2, 32 T(-2, -2 P, following the same logic that we used for rotations around a fixed point. In general the equation to scale by (S x, S y fixing the point (x, y will be: P = T(x, y S(S x, S y T(-x, -y P. 3
14 6. Comparison of Cartesian and Homogeneous Approaches Although it appears that the homogeneous approach is much more complicated than the Cartesian approach, it provides dramatic performance benefits if we want to apply a number of transformations to a figure with a fairly large number of points, which is the normal situation in a graphics program. For example, say one has a relatively simple graphics scene with 5, control points to be transformed, and one wants to first rotate with some fixed point, then scale with another fixed point, and then rotate again with a third fixed point. In the Cartesian environment we ll have to do something like P = T 6 + (R 2 (T 5 + (T 4 + (S (T 3 + (T 2 + (R (T + P 5, times. We can simplify things a bit by pre-computing T 5 + T 4 and T 3 + T 2, but the computation done 5, times still looks like P = T 6 + R 2 (T 7 + S (T 8 + R (T + P. With homogeneous coordinates this initially looks worse, because the additions become matrix multiplications, as in P = T 6 (R 2 (T 5 (T 4 (S (T 3 (T 2 (R (T P but matrix multiply associates and so this is equivalent to P = (T 6 R 2 T 5 T 4 S T 3 T 2 R T P We can now (one time only compute the Combined Transformation Matrix, say C, as C = T 6 R 2 T 5 T 4 S T 3 T 2 R T and then, 5, times, just compute P = C * P. This will cost about 2,64 additions and 2,48 multiplications, whereas the Cartesian approach will take 7,4 additions and 6, 4
15 multiplications. And this was for a trivial case. As the number of transformation operations goes up, or when we move from 2D to 3D, the gain in efficiency increases significantly. One thing to note here is that the bottom row of all three homogeneous matrices is (,,, and if you multiply two matrices like this the result will also have the same bottom row. I.e., all general 2D homogeneous multiplications will have the form: a b c d e f g h i j k l = ag + ch bg + dh ai + cj bi + dj ak + cl + e bk + dl + f and so only 2 multiplies and 8 additions are needed to compute the new matrix. Further efficiencies exist for some specific multiplications. For example it is easy to see that multiplying two homogeneous translation matrices takes two additions and no multiplications because one is just adding the two transformations. Multiplying a translation and a rotation matrix or a translation and a scaling matrix requires no additions and no multiplications. So further efficiencies are possible when computing the combined transformation matrix, but this is only done once, so they are not very important. 5
16 7. 3D Transformations Using Homogeneous Coordinates The efficiency gains for homogeneous coordinates over Cartesian coordinates are much higher when we go to 3D, and so there is no reason to consider Cartesian coordinates further. So from now on we will use 3D homogeneous coordinates, which in the general case will have the form (x, y, z, w, but for now will be (x, y, z,, as in the 2D case. The point, in vector form, will be: P = & x y z % Translation and scaling matrices follow directly from the 2D analysis, and are: Translation: P = x y z P Scaling: P = Sx Sy Sz P Rotation is more complicated, because it is not immediately clear what we should be rotating around in a 3D environment. We could rotate around an arbitrary axis, but most users (including me often have a hard time visualizing what is going to happen if, for example, they rotate by 3 around an axis with direction vector (2, 3, -. To avoid this problem we will only consider rotations around one of the three primary axes, x, y, and z. Any complex rotation will then have to be built up as a sequence of rotations around these axes. (We ll look at arbitrary rotations when we study quaternions. 6
17 The direction of rotation will, by generally accepted convention, be counterclockwise when looking down the axis towards the origin. I.e., as the picture below shows, a rotation around the x axis will move parallel to the y/z plane in the direction from y to z, a rotation around the y axis will move parallel to the z/x plane in the direction from z to x, and a rotation around the z axis will move parallel to the x/y plane in the direction from x to y. y Around z Around x x z Around y Before we get into matrices, we should note one potential problem, which is that if one does rotations by breaking them down into rotations around the primary axes, then the order of rotations matters. E.g., if we do a θ rotation around x followed by a φ rotation around z, then in general the result will be different from doing a φ rotation around z followed by a θ rotation around x. To see this, consider a line lying along the x axis, presumably as an edge on some object. If we do a 9 rotation around x, it will spin in place and still lie on the x axis. If we follow that with a 9 rotation around z it will now lie along the y axis. If we reverse these operations, then the 9 rotation will put it on the y axis, and then the rotation around x will leave it lying along z. The simplest rotation matrix to develop is the rotation around z, which we ll call R z. When we do this the effect on x and y values will mirror the 2D case, and the z value will be unchanged, and so the formula will be: 7
18 8 P = sin( cos( cos( sin( P We can now derive R x and R y from R z by symmetry: R x (θ = sin( cos( cos( sin( R y (θ = sin( cos( % % cos( sin(. The only thing to be careful of here is the location of the negative sign on the sin function in R y. In R z the rotation is from x to y, and the negative sign is on the xy element (row, column 2 of the matrix. So since R y rotates from z to x, symmetry requires that the negative sign must be on the zx element of the matrix (row 3, column.
19 9 8. Example Build the combined transformation matrix, C, for a clockwise rotation of 9 around the y axis fixing the point (,, followed by a scale of (2,, fixing the point (,,. Apply the matrix to the Cartesian point (, 2, -. The order of the operations will be:. T(-,, - 2. R y (-9 (remember that the default is ccw 3. T(,, 4. T(, -, - 5. S(2,, 6. T(,, Remembering to put these right to left, and noting that the clockwise rotation changes the signs of the sins, we have: = C 2 Calling these matrices A, B, D, E, F, and G, and taking these a pair at a time we have: AB = 2 DE = FG = ABDE = 2 2 C = ABDEFG = 2 4
20 2 Applying this matrix to the Cartesian (, 2, -: 2 4 % & ' 2 = % & 2 6, and so (, 2, - is transformed to (6, 2,.
Graphics and Interaction Transformation geometry and homogeneous coordinates
433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation
More informationCOMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates
COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation
More informationTo graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6
Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points
More informationUNIT 2 2D TRANSFORMATIONS
UNIT 2 2D TRANSFORMATIONS Introduction With the procedures for displaying output primitives and their attributes, we can create variety of pictures and graphs. In many applications, there is also a need
More informationObject Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects
Object Representation Affine Transforms Polygonal Representation of Objects Although perceivable the simplest form of representation they can also be the most problematic. To represent an object polygonally,
More information3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations
3D Mathematics Co-ordinate systems, 3D primitives and affine transformations Coordinate Systems 2 3 Primitive Types and Topologies Primitives Primitive Types and Topologies 4 A primitive is the most basic
More information2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University
2D Image Transforms 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Extract features from an image what do we do next? Feature matching (object recognition, 3D reconstruction, augmented
More informationTransformations: 2D Transforms
1. Translation Transformations: 2D Transforms Relocation of point WRT frame Given P = (x, y), translation T (dx, dy) Then P (x, y ) = T (dx, dy) P, where x = x + dx, y = y + dy Using matrix representation
More informationCoordinate transformations. 5554: Packet 8 1
Coordinate transformations 5554: Packet 8 1 Overview Rigid transformations are the simplest Translation, rotation Preserve sizes and angles Affine transformation is the most general linear case Homogeneous
More informationLinear algebra deals with matrixes: two-dimensional arrays of values. Here s a matrix: [ x + 5y + 7z 9x + 3y + 11z
Basic Linear Algebra Linear algebra deals with matrixes: two-dimensional arrays of values. Here s a matrix: [ 1 5 ] 7 9 3 11 Often matrices are used to describe in a simpler way a series of linear equations.
More informationTo graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:
Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points
More informationHello, welcome to the video lecture series on Digital Image Processing. So in today's lecture
Digital Image Processing Prof. P. K. Biswas Department of Electronics and Electrical Communications Engineering Indian Institute of Technology, Kharagpur Module 02 Lecture Number 10 Basic Transform (Refer
More informationTransformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico
Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E Addison-Wesley 25 1 Objectives
More informationChapter 2 - Basic Mathematics for 3D Computer Graphics
Chapter 2 - Basic Mathematics for 3D Computer Graphics Three-Dimensional Geometric Transformations Affine Transformations and Homogeneous Coordinates Combining Transformations Translation t + t Add a vector
More informationInteractive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing
Interactive Computer Graphics Aliasing and Anti-Aliasing Hearn & Baker, chapter 4-7 D transforms Hearn & Baker, chapter 5 Aliasing and Anti-Aliasing Problem: jaggies Also known as aliasing. It results
More informationComputer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL
Chapter 5 Geometric Transformations Somsak Walairacht, Computer Engineering, KMITL 1 Outline Basic Two-Dimensional Geometric Transformations Matrix Representations and Homogeneous Coordinates Inverse Transformations
More informationComputer Graphics Geometric Transformations
Computer Graphics 2016 6. Geometric Transformations Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2016-10-31 Contents Transformations Homogeneous Co-ordinates Matrix Representations of Transformations
More informationGeometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation
Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation and the type of an object. Even simple scaling turns a
More information521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)
5493S Computer Graphics Exercise Solution (Chapters 4-5). Given two nonparallel, three-dimensional vectors u and v, how can we form an orthogonal coordinate system in which u is one of the basis vectors?
More informationQuaternion Rotations AUI Course Denbigh Starkey
Major points of these notes: Quaternion Rotations AUI Course Denbigh Starkey. What I will and won t be doing. Definition of a quaternion and notation 3 3. Using quaternions to rotate any point around an
More informationTransforms. COMP 575/770 Spring 2013
Transforms COMP 575/770 Spring 2013 Transforming Geometry Given any set of points S Could be a 2D shape, a 3D object A transform is a function T that modifies all points in S: T S S T v v S Different transforms
More informationMATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS
MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS This tutorial is essential pre-requisite material for anyone studying mechanical engineering. This tutorial uses the principle of learning by example.
More information2D transformations: An introduction to the maths behind computer graphics
2D transformations: An introduction to the maths behind computer graphics Lecturer: Dr Dan Cornford d.cornford@aston.ac.uk http://wiki.aston.ac.uk/dancornford CS2150, Computer Graphics, Aston University,
More informationMath background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6
Math background 2D Geometric Transformations CS 4620 Lecture 6 Read: Chapter 2: Miscellaneous Math Chapter 5: Linear Algebra Notation for sets, functions, mappings Linear transformations Matrices Matrix-vector
More informationMath 231E, Lecture 34. Polar Coordinates and Polar Parametric Equations
Math 231E, Lecture 34. Polar Coordinates and Polar Parametric Equations 1 Definition of polar coordinates Let us first recall the definition of Cartesian coordinates: to each point in the plane we can
More informationGame Engineering CS S-05 Linear Transforms
Game Engineering CS420-2016S-05 Linear Transforms David Galles Department of Computer Science University of San Francisco 05-0: Matrices as Transforms Recall that Matrices are transforms Transform vectors
More information(Refer Slide Time: 00:04:20)
Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 8 Three Dimensional Graphics Welcome back all of you to the lectures in Computer
More informationComputer Graphics 7: Viewing in 3-D
Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations
More informationComputer Science 336 Fall 2017 Homework 2
Computer Science 336 Fall 2017 Homework 2 Use the following notation as pseudocode for standard 3D affine transformation matrices. You can refer to these by the names below. There is no need to write out
More informationLecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016
Lecture 4: Transforms Computer Graphics CMU 15-462/15-662, Fall 2016 Brief recap from last class How to draw a triangle - Why focus on triangles, and not quads, pentagons, etc? - What was specific to triangles
More informationGEOMETRIC TRANSFORMATIONS AND VIEWING
GEOMETRIC TRANSFORMATIONS AND VIEWING 2D and 3D 1/44 2D TRANSFORMATIONS HOMOGENIZED Transformation Scaling Rotation Translation Matrix s x s y cosθ sinθ sinθ cosθ 1 dx 1 dy These 3 transformations are
More information+ i a y )( cosφ + isinφ) ( ) + i( a x. cosφ a y. = a x
Rotation Matrices and Rotated Coordinate Systems Robert Bernecky April, 2018 Rotated Coordinate Systems is a confusing topic, and there is no one standard or approach 1. The following provides a simplified
More informationVector Algebra Transformations. Lecture 4
Vector Algebra Transformations Lecture 4 Cornell CS4620 Fall 2008 Lecture 4 2008 Steve Marschner 1 Geometry A part of mathematics concerned with questions of size, shape, and relative positions of figures
More information2D Object Definition (1/3)
2D Object Definition (1/3) Lines and Polylines Lines drawn between ordered points to create more complex forms called polylines Same first and last point make closed polyline or polygon Can intersect itself
More informationTransformations Week 9, Lecture 18
CS 536 Computer Graphics Transformations Week 9, Lecture 18 2D Transformations David Breen, William Regli and Maxim Peysakhov Department of Computer Science Drexel University 1 3 2D Affine Transformations
More informationLecture 5 2D Transformation
Lecture 5 2D Transformation What is a transformation? In computer graphics an object can be transformed according to position, orientation and size. Exactly what it says - an operation that transforms
More informationBasics of Computational Geometry
Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals
More informationGeometric Transformations
Geometric Transformations CS 4620 Lecture 9 2017 Steve Marschner 1 A little quick math background Notation for sets, functions, mappings Linear and affine transformations Matrices Matrix-vector multiplication
More informationCSE328 Fundamentals of Computer Graphics
CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu
More informationEditing and Transformation
Lecture 5 Editing and Transformation Modeling Model can be produced b the combination of entities that have been edited. D: circle, arc, line, ellipse 3D: primitive bodies, etrusion and revolved of a profile
More informationGame Engineering: 2D
Game Engineering: 2D CS420-2010F-07 Objects in 2D David Galles Department of Computer Science University of San Francisco 07-0: Representing Polygons We want to represent a simple polygon Triangle, rectangle,
More information2D and 3D Coordinate Systems and Transformations
Graphics & Visualization Chapter 3 2D and 3D Coordinate Systems and Transformations Graphics & Visualization: Principles & Algorithms Introduction In computer graphics is often necessary to change: the
More information2D/3D Geometric Transformations and Scene Graphs
2D/3D Geometric Transformations and Scene Graphs Week 4 Acknowledgement: The course slides are adapted from the slides prepared by Steve Marschner of Cornell University 1 A little quick math background
More informationLast week. Machiraju/Zhang/Möller/Fuhrmann
Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear
More informationCS612 - Algorithms in Bioinformatics
Fall 2017 Structural Manipulation November 22, 2017 Rapid Structural Analysis Methods Emergence of large structural databases which do not allow manual (visual) analysis and require efficient 3-D search
More informationCT5510: Computer Graphics. Transformation BOCHANG MOON
CT5510: Computer Graphics Transformation BOCHANG MOON 2D Translation Transformations such as rotation and scale can be represented using a matrix M.., How about translation? No way to express this using
More informationCSE528 Computer Graphics: Theory, Algorithms, and Applications
CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu
More informationCOMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective
COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective Department of Computing and Information Systems The Lecture outline Introduction Rotation about artibrary axis
More informationPARAMETRIC EQUATIONS AND POLAR COORDINATES
10 PARAMETRIC EQUATIONS AND POLAR COORDINATES PARAMETRIC EQUATIONS & POLAR COORDINATES A coordinate system represents a point in the plane by an ordered pair of numbers called coordinates. PARAMETRIC EQUATIONS
More informationPolar Coordinates. 2, π and ( )
Polar Coordinates Up to this point we ve dealt exclusively with the Cartesian (or Rectangular, or x-y) coordinate system. However, as we will see, this is not always the easiest coordinate system to work
More informationLinear transformations Affine transformations Transformations in 3D. Graphics 2009/2010, period 1. Lecture 5: linear and affine transformations
Graphics 2009/2010, period 1 Lecture 5 Linear and affine transformations Vector transformation: basic idea Definition Examples Finding matrices Compositions of transformations Transposing normal vectors
More informationMathematics 308 Geometry. Chapter 9. Drawing three dimensional objects
Mathematics 308 Geometry Chapter 9. Drawing three dimensional objects In this chapter we will see how to draw three dimensional objects with PostScript. The task will be made easier by a package of routines
More informationOverview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections
Overview Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections ITCS 4120/5120 1 Mathematical Fundamentals Geometric Transformations A set of tools that aid
More informationAnswers to practice questions for Midterm 1
Answers to practice questions for Midterm Paul Hacking /5/9 (a The RREF (reduced row echelon form of the augmented matrix is So the system of linear equations has exactly one solution given by x =, y =,
More informationAffine Transformation. Edith Law & Mike Terry
Affine Transformation Edith Law & Mike Terry Graphic Models vs. Images Computer Graphics: the creation, storage and manipulation of images and their models Model: a mathematical representation of an image
More informationMatrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation
Chapter 7 Introduction to Matrices This chapter introduces the theory and application of matrices. It is divided into two main sections. Section 7.1 discusses some of the basic properties and operations
More informationFunctions and Graphs. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.
Functions and Graphs The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996. Launch Mathematica. Type
More informationWhat and Why Transformations?
2D transformations What and Wh Transformations? What? : The geometrical changes of an object from a current state to modified state. Changing an object s position (translation), orientation (rotation)
More informationSupplementary Material: The Rotation Matrix
Supplementary Material: The Rotation Matrix Computer Science 4766/6778 Department of Computer Science Memorial University of Newfoundland January 16, 2014 COMP 4766/6778 (MUN) The Rotation Matrix January
More information1. Carlos A. Felippa, Introduction to Finite Element Methods,
Chapter Finite Element Methods In this chapter we will consider how one can model the deformation of solid objects under the influence of external (and possibly internal) forces. As we shall see, the coupled
More informationAffine Transformations Computer Graphics Scott D. Anderson
Affine Transformations Computer Graphics Scott D. Anderson 1 Linear Combinations To understand the poer of an affine transformation, it s helpful to understand the idea of a linear combination. If e have
More informationFigure 1: 2D arm. Figure 2: 2D arm with labelled angles
2D Kinematics Consier a robotic arm. We can sen it commans like, move that joint so it bens at an angle θ. Once we ve set each joint, that s all well an goo. More interesting, though, is the question of
More informationNURBS: Non-Uniform Rational B-Splines AUI Course Denbigh Starkey
NURBS: Non-Uniform Rational B-Splines AUI Course Denbigh Starkey 1. Background 2 2. Definitions 3 3. Using NURBS to define a circle 4 4. Homogeneous coordinates & control points at infinity 9 5. Constructing
More informationUNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01
UNIT 2 Translation/ Scaling/ Rotation Unit-02/Lecture-01 Translation- (RGPV-2009,10,11,13,14) Translation is to move, or parallel shift, a figure. We use a simple point as a starting point. This is a simple
More informationMonday, 12 November 12. Matrices
Matrices Matrices Matrices are convenient way of storing multiple quantities or functions They are stored in a table like structure where each element will contain a numeric value that can be the result
More informationEECE 478. Learning Objectives. Learning Objectives. Linear Algebra and 3D Geometry. Linear algebra in 3D. Coordinate systems
EECE 478 Linear Algebra and 3D Geometry Learning Objectives Linear algebra in 3D Define scalars, points, vectors, lines, planes Manipulate to test geometric properties Coordinate systems Use homogeneous
More informationVector Calculus: Understanding the Cross Product
University of Babylon College of Engineering Mechanical Engineering Dept. Subject : Mathematics III Class : 2 nd year - first semester Date: / 10 / 2016 2016 \ 2017 Vector Calculus: Understanding the Cross
More informationSection 10.1 Polar Coordinates
Section 10.1 Polar Coordinates Up until now, we have always graphed using the rectangular coordinate system (also called the Cartesian coordinate system). In this section we will learn about another system,
More informationturn counterclockwise from the positive x-axis. However, we could equally well get to this point by a 3 4 turn clockwise, giving (r, θ) = (1, 3π 2
Math 133 Polar Coordinates Stewart 10.3/I,II Points in polar coordinates. The first and greatest achievement of modern mathematics was Descartes description of geometric objects b numbers, using a sstem
More informationCALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES
CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES YINGYING REN Abstract. In this paper, the applications of homogeneous coordinates are discussed to obtain an efficient model
More informationPreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9)
PreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9) Name Date Directions: You may NOT use Right Triangle Trigonometry for any of these problems! Use your unit circle knowledge to solve these problems.
More informationComputer Graphics Hands-on
Computer Graphics Hands-on Two-Dimensional Transformations Objectives Visualize the fundamental 2D geometric operations translation, rotation about the origin, and scale about the origin Learn how to compose
More informationHomogeneous Coordinates and Transformations of the Plane
2 Homogeneous Coordinates and Transformations of the Plane 2. Introduction In Chapter planar objects were manipulated by applying one or more transformations. Section.7 identified the problem that the
More informationComputer Vision cmput 428/615
Computer Vision cmput 428/615 Basic 2D and 3D geometry and Camera models Martin Jagersand The equation of projection Intuitively: How do we develop a consistent mathematical framework for projection calculations?
More informationComputer Graphics with OpenGL ES (J. Han) Chapter IV Spaces and Transforms
Chapter IV Spaces and Transforms Scaling 2D scaling with the scaling factors, s x and s y, which are independent. Examples When a polygon is scaled, all of its vertices are processed by the same scaling
More information1 Affine and Projective Coordinate Notation
CS348a: Computer Graphics Handout #9 Geometric Modeling Original Handout #9 Stanford University Tuesday, 3 November 992 Original Lecture #2: 6 October 992 Topics: Coordinates and Transformations Scribe:
More informationPolar Coordinates
Polar Coordinates 7-7-2 Polar coordinates are an alternative to rectangular coordinates for referring to points in the plane. A point in the plane has polar coordinates r,θ). r is roughly) the distance
More informationImage warping , , Computational Photography Fall 2017, Lecture 10
Image warping http://graphics.cs.cmu.edu/courses/15-463 15-463, 15-663, 15-862 Computational Photography Fall 2017, Lecture 10 Course announcements Second make-up lecture on Friday, October 6 th, noon-1:30
More informationComputer Graphics: Geometric Transformations
Computer Graphics: Geometric Transformations Geometric 2D transformations By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, 1 Outlines 1. Basic 2D transformations 2. Matrix Representation of 2D transformations
More informationCS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations
CS 445 / 645 Introduction to Computer Graphics Lecture 21 Representing Rotations Parameterizing Rotations Straightforward in 2D A scalar, θ, represents rotation in plane More complicated in 3D Three scalars
More informationInstitutionen för systemteknik
Code: Day: Lokal: M7002E 19 March E1026 Institutionen för systemteknik Examination in: M7002E, Computer Graphics and Virtual Environments Number of sections: 7 Max. score: 100 (normally 60 is required
More informationUnit 3 Transformations and Clipping
Transformation Unit 3 Transformations and Clipping Changes in orientation, size and shape of an object by changing the coordinate description, is known as Geometric Transformation. Translation To reposition
More informationTrigonometric ratios provide relationships between the sides and angles of a right angle triangle. The three most commonly used ratios are:
TRIGONOMETRY TRIGONOMETRIC RATIOS If one of the angles of a triangle is 90º (a right angle), the triangle is called a right angled triangle. We indicate the 90º (right) angle by placing a box in its corner.)
More informationTransforming Objects in Inkscape Transform Menu. Move
Transforming Objects in Inkscape Transform Menu Many of the tools for transforming objects are located in the Transform menu. (You can open the menu in Object > Transform, or by clicking SHIFT+CTRL+M.)
More informationComputer Graphics and Linear Algebra Rebecca Weber, 2007
Computer Graphics and Linear Algebra Rebecca Weber, 2007 Vector graphics refers to representing images by mathematical descriptions of geometric objects, rather than by a collection of pixels on the screen
More informationAnswers. Chapter 2. 1) Give the coordinates of the following points:
Answers Chapter 2 1) Give the coordinates of the following points: a (-2.5, 3) b (1, 2) c (2.5, 2) d (-1, 1) e (0, 0) f (2, -0.5) g (-0.5, -1.5) h (0, -2) j (-3, -2) 1 2) List the 48 different possible
More informationCS F-07 Objects in 2D 1
CS420-2010F-07 Objects in 2D 1 07-0: Representing Polgons We want to represent a simple polgon Triangle, rectangle, square, etc Assume for the moment our game onl uses these simple shapes No curves for
More information10.1 Curves Defined by Parametric Equations
10.1 Curves Defined by Parametric Equations Ex: Consider the unit circle from Trigonometry. What is the equation of that circle? There are 2 ways to describe it: x 2 + y 2 = 1 and x = cos θ y = sin θ When
More informationThe Three Dimensional Coordinate System
The Three-Dimensional Coordinate System The Three Dimensional Coordinate System You can construct a three-dimensional coordinate system by passing a z-axis perpendicular to both the x- and y-axes at the
More information3D Computer Graphics. Jared Kirschner. November 8, 2010
3D Computer Graphics Jared Kirschner November 8, 2010 1 Abstract We are surrounded by graphical displays video games, cell phones, television sets, computer-aided design software, interactive touch screens,
More informationCSC418 / CSCD18 / CSC2504
5 5.1 Surface Representations As with 2D objects, we can represent 3D objects in parametric and implicit forms. (There are also explicit forms for 3D surfaces sometimes called height fields but we will
More informationINTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52
cs337 It looks like a matrix Sort of Viewing III Projection in Practice / 52 cs337 Arbitrary 3D views Now that we have familiarity with terms we can say that these view volumes/frusta can be specified
More informationLesson 28: When Can We Reverse a Transformation?
Lesson 8 M Lesson 8: Student Outcomes Students determine inverse matrices using linear systems. Lesson Notes In the final three lessons of this module, students discover how to reverse a transformation
More informationMATHEMATICS FOR ENGINEERING TRIGONOMETRY
MATHEMATICS FOR ENGINEERING TRIGONOMETRY TUTORIAL SOME MORE RULES OF TRIGONOMETRY This is the one of a series of basic tutorials in mathematics aimed at beginners or anyone wanting to refresh themselves
More informationToday. Parity. General Polygons? Non-Zero Winding Rule. Winding Numbers. CS559 Lecture 11 Polygons, Transformations
CS559 Lecture Polygons, Transformations These are course notes (not used as slides) Written by Mike Gleicher, Oct. 005 With some slides adapted from the notes of Stephen Chenney Final version (after class)
More informationTrigonometry I -- Answers -- Trigonometry I Diploma Practice Exam - ANSWERS 1
Trigonometry I -- Answers -- Trigonometry I Diploma Practice Exam - ANSWERS www.puremath.com Formulas These are the formulas for Trig I you will be given on your diploma. a rθ sinθ cosθ tan θ cotθ cosθ
More informationQuaternions and Dual Coupled Orthogonal Rotations in Four-Space
Quaternions and Dual Coupled Orthogonal Rotations in Four-Space Kurt Nalty January 8, 204 Abstract Quaternion multiplication causes tensor stretching) and versor turning) operations. Multiplying by unit
More informationComputer Graphics Viewing
Computer Graphics Viewing What Are Projections? Our 3-D scenes are all specified in 3-D world coordinates To display these we need to generate a 2-D image - project objects onto a picture plane Picture
More informationComputer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.
Computer Vision Coordinates Prof. Flávio Cardeal DECOM / CEFET- MG cardeal@decom.cefetmg.br Abstract This lecture discusses world coordinates and homogeneous coordinates, as well as provides an overview
More informationMathematics 205 HWK 21 Solutions Section 16.5 p766
Mathematics 5 HK 1 Solutions Section 16.5 p766 Problem 5, 16.5, p766. For the region shown (a rectangular slab of dimensions 1 5; see the text), choose coordinates and set up a triple integral, including
More information