Fall 2004CS-321 Dr. Mark L. Hornick 1 2-D Transformations World Coordinates Local/Modelling Coordinates x y Object descriptions Often defined in model.

Slides:



Advertisements
Similar presentations
CS 691 Computational Photography Instructor: Gianfranco Doretto Image Warping.
Advertisements

COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
Denavit-Hartenberg Convention
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
Mapping: Scaling Rotation Translation Warp
Geometry (Many slides adapted from Octavia Camps and Amitabh Varshney)
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
2D Geometric Transformations
Chapter 4.1 Mathematical Concepts
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Math for CSTutorial 11 Course Outline Homogeneous Coordinates.
Linear Algebra and SVD (Some slides adapted from Octavia Camps)
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz
Ch. 2: Rigid Body Motions and Homogeneous Transforms
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Ch. 4: Velocity Kinematics
3-D Geometry.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Rotations and Translations. Representing a Point 3D A tri-dimensional point A is a reference coordinate system here.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Screw Rotation and Other Rotational Forms
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
CAP4730: Computational Structures in Computer Graphics
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
CS 450: Computer Graphics 2D TRANSFORMATIONS
2IV60 Computer Graphics Basic Math for CG
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
1 C01 – Advanced Robotics for Autonomous Manipulation Department of Mechanical EngineeringME 696 – Advanced Topics in Mechanical Engineering.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
Image Warping (Szeliski 3.6.1) cs129: Computational Photography James Hays, Brown, Fall 2012 Slides from Alexei Efros and Steve Seitz
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Kinematics of Robot Manipulator
CGPage: 1 東吳資訊科學 江清水 3.1 2D Geometry - points and polygons X Y A point in 2D is represented by two real numbers (X,Y) A line segment is represented by.
1 Math Review Coordinate systems 2-D, 3-D Vectors Matrices Matrix operations.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Geometric Transformations
Spatial Descriptions and Transformations Sebastian van Delden USC Upstate
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Fall 2004CS-321 Dr. Mark L. Hornick 1 Final Exam Monday Nov 13, 2-4pm CC-43 Bring Calculator – no laptops Note sheet Complete FAST entries before exam.
Geometrical Transformations 2 Adapted from Fundamentals of Interactive Computer Graphics, Foley and van Dam, pp , by Geb Thomas.
What is Kinematics. Kinematics studies the motion of bodies.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
Composite 3D Transformations. Example of Composite 3D Transformations Try to transform the line segments P 1 P 2 and P 1 P 3 from their start position.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
January 19, y X Z Translations Objects are usually defined relative to their own coordinate system. We can translate points in space to new positions.
3-D Transformational Geometry CS418 Computer Graphics John C. Hart.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 3: Transformations 1
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Composite 3D Transformations. Example of Composite 3D Transformations Try to transform the line segments P 1 P 2 and P 1 P 3 from their start position.
Recap from Monday DCT and JPEG Point Processing Histogram Normalization Questions: JPEG compression levels Gamma correction.
KINEMATICS ANALYSIS OF ROBOTS (Part 5). This lecture continues the discussion on the analysis of the forward and inverse kinematics of robots. After this.
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Coordinate Systems and Transformations
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Spatcial Description & Transformation
Mobile Robot Kinematics
Transformations in 3 Dimensions CS /28/2018 Dr. Mark L. Hornick
(c) University of Wisconsin, CS559
Chapter 2 Mathematical Analysis for Kinematics
Presentation transcript:

Fall 2004CS-321 Dr. Mark L. Hornick 1 2-D Transformations World Coordinates Local/Modelling Coordinates x y Object descriptions Often defined in model coordinates Must be mapped to world coordinates Groups of objects are combined; complete image is formed by combining primitives

Fall 2004CS-321 Dr. Mark L. Hornick 2 2-D Transformations World Coordinates Local/Modelling Coordinates x y Problem statement: Convert points from coordinates in one system to a second coordinate system

Fall 2004CS-321 Dr. Mark L. Hornick 3 2-D Transformations x1x1 y2y2 x2x2 y1y1 v1v1 v2v2 p First, consider the case where two coordinate systems are offset by a pure translation Definitions v 2 – vector from origin of coordinate system xy 2 to a point on the object has scalar components (v 2x,v 2y ) v 1 – vector from origin of coordinate system xy 1 to a point on the object has scalar components (v 1x,v 1y ) p – vector from origin of coordinate system xy 1 to the origin of xy 2 has scalar components (p x,p y )

Fall 2004CS-321 Dr. Mark L. Hornick 4 2-D Transformations: Translation x1x1 y2y2 x2x2 y1y1 v1v1 v2v2 p Using vector math: v 1 = p + v 2 In terms of scalar components: v 1x = p x + v 2x v 1y = p y + v 2y And conversely: v 2 = v 1 – p v 2x = v 1x - p x v 2y = v 1y - p y

Fall 2004CS-321 Dr. Mark L. Hornick 5 2-D Transformations: Rotation x1x1 y1y1 v1v1 y2y2 x2x2 v2v2 Now consider the case of a pure rotation of one coordinate system with respect to the other A simple case is rotation by 180 degrees In this case, vectors v 1 and v 2 are coincident (they lie on top of each other), but they have opposite sense, that is: v 1 = -v 2 In terms of scalar components: v 1x = - v 2x v 1y = - v 2y x1x1 y1y1 v1v1 y2y2 x2x2 v2v2

Fall 2004CS-321 Dr. Mark L. Hornick 6 2-D Transformations: Rotation x1x1 v1v1 y2y2 x2x2 v2v2 Next, consider the general case of a pure rotation of one coordinate system with respect to the other, but through an arbitrary angle  x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  

Fall 2004CS-321 Dr. Mark L. Hornick 7 2-D Transformations: Rotation Using trigonometry, it can be shown that: In terms of scalar components: v 1x = v 2x cos  - v 2y sin  v 1y = v 2y cos  + v 2x sin  In vector terms: v 1 = v 2 cos  + (-v 2y,v 2y ) sin  But what vector is (-v 2y,v 2y )? It can be shown that x1x1 v1v1 y2y2 x2x2 v2v2 x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  

Fall 2004CS-321 Dr. Mark L. Hornick 8 2-D Transformations: Rotation Instead of using vector representation, these equations can also be cast in matrix form: x1x1 v1v1 y2y2 x2x2 v2v2 x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  

Fall 2004CS-321 Dr. Mark L. Hornick 9 2-D Transformations: Rotation Now that we have v 1 in terms of v 2, how do we express v 2 in terms of v 1 ? Where R(  ) -1 is the inverse of R(  ) x1x1 v1v1 y2y2 x2x2 v2v2 x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  

Fall 2004CS-321 Dr. Mark L. Hornick 10 2-D Transformations: Rotation To express v 2 in terms of v 1, we can think of xy 1 rotated through a negative angle  x1x1 v1v1 y2y2 x2x2 v2v2 x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  

Fall 2004CS-321 Dr. Mark L. Hornick 11 2-D Transformations: Rotation So the inverse R(  ) -1 is R(-  ) Note also that the inverse R(  ) -1 is simply the transpose of R(-  ) since the off-diagonal elements are swapped This is a property of special matrices called orthonormal matrices; Rotation matrices are orthonormal This makes it easy to find the inverse of a rotation matrix x1x1 v1v1 y2y2 x2x2 v2v2 x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  

Fall 2004CS-321 Dr. Mark L. Hornick 12 Combining Rotation and Translation The case of combined rotation and translation can be deconstructed into a pure rotation followed by a pure translation. The pure rotation transforms vector v 2 from coordinate frame xy 1 to vector v* 2 in frame xy* 2 The following pure translation transforms v* 2 from frame xy* 2 into vector v 1 in frame xy 1 x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  p y* 2 x* 2

Fall 2004CS-321 Dr. Mark L. Hornick 13 Combining Rotation and Translation The equations that describe this transformation are just the combination of those we have already seen: x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  p y* 2 x* 2

Fall 2004CS-321 Dr. Mark L. Hornick 14 Combining Rotation and Translation This equation can be recast using a mathematical trick: This is called a 3x3 homogeneous transformation matrix T ( ,p) x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  p y* 2 x* 2

Fall 2004CS-321 Dr. Mark L. Hornick 15 Combining Rotation and Translation T ( , p ) can be expressed in terms of submatrices as The inverse of T ( , p ) is given by x1x1 y1y1 v1v1 v2v2 y2y2 x2x2  p y* 2 x* 2