©Larry F. Hodges (modified by Amos Johnson) 1 3-D Mathematical Preliminaries & Transformations.

Slides:



Advertisements
Similar presentations
3D Transformations Assist. Prof. Dr. Ahmet Sayar
Advertisements

Computer Graphics: 3D Transformations
1 Computer Graphics Chapter 8 3D Transformations.
©Larry F. Hodges (modified by Amos Johnson) 1 Arbitrary 3-D View-Plane.
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
Geometry (Many slides adapted from Octavia Camps and Amitabh Varshney)
CMPE 466 COMPUTER GRAPHICS
Chapter 4.1 Mathematical Concepts
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
2D/3D Geometric Transformations CS485/685 Computer Vision Dr. George Bebis.
3D Coordinate Systems and Transformations Revision 1
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
3-D Geometry.
CS 376 Introduction to Computer Graphics 02 / 26 / 2007 Instructor: Michael Eckmann.
Larry F. Hodges (modified by Amos Johnson) 1 2D Transformations.
2IV60 Computer graphics set 4:3D transformations and hierarchical modeling Jack van Wijk TU/e.
04 – Geometric Transformations Overview Geometric Primitives –Points, Lines, Planes 2D Geometric Transformations –Translation, Rotation, Scaling, Affine,
Mathematical Fundamentals
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
5.2 Three-Dimensional Geometric and Modeling Transformations 2D3D Consideration for the z coordinate.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
2D Geometric Transformations
Part7: Geometric Transformations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
CS 325 Introduction to Computer Graphics 02 / 17 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Spatial Descriptions and Transformations Sebastian van Delden USC Upstate
Computer Graphics, KKU. Lecture 51 Transformations Given two frames in an affine space of dimension n, we can find a ( n+1 ) x ( n +1) matrix that.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
CS654: Digital Image Analysis Lecture 6: Basic Transformations.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
Basic Projections 2D to 3D
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
Computer Graphics 3D Transformations. Translation.
Geometric Transformations
Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
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
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS D Geometric Transformations Graphics Systems.
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 Geometric Transformations
3D Geometric Transformation
3D Geometric Transformation
CSCI 425/ D Mathematical Preliminaries. CSCI 425/525 2 Coordinate Systems Z X Y Y X Z Right-handed coordinate system Left-handed coordinate system.
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
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.
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
2D Transformation Homogenous Coordinates Scale/Rotate/Reflect/Shear: X’ = XT Translate: X’ = X + T Multiple values for the same point e.g., (2, 3, 6)
CS 376 Introduction to Computer Graphics 02 / 14 / 2007 Instructor: Michael Eckmann.
3D Transformations 2D coordinates3D coordinates x y x y z x z y Right-handed coordinate system:
An Introduction to Robot Kinematics Renata Melamud.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
3D Geometry and Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Modeling Transformation
Transformations Review 4/18/2018 ©Babu 2009.
3D Geometric Transformation
3D Transformation.
Review: Transformations
CSCE441: Computer Graphics 2D/3D Transformations
Transformations.
Translation in Homogeneous Coordinates
Presentation transcript:

©Larry F. Hodges (modified by Amos Johnson) 1 3-D Mathematical Preliminaries & Transformations

©Larry F. Hodges (modified by Amos Johnson) 2 Coordinate Systems

©Larry F. Hodges (modified by Amos Johnson) 3 Parametric Definition of a Line Given two points P 1 = (x 1, y 1, z 1 ), P 2 = ( x 2, y 2, z 2 ) x = x 1 + t (x 2 - x 1 ) y = y 1 + t (y 2 - y 1 ) z = z 1 + t (z 2 - z 1 ) Given a point P 1 and a vector V = [x v, y v, z v ] x = x 1 + t x v, y = y 1 + t y v, z = z 1 + t z v COMPACT FORM: L = P 1 + t[P 2 - P 1 ] or L = P 1 + Vt P1P1 P2P2 t = 1 t = 0 t > 1 t < 0

©Larry F. Hodges (modified by Amos Johnson) 4 3-D Vectors Have length and directionV = [x v, y v, z v ] Length is given by the Euclidean Norm||V|| = sqrt ( x v 2 + y v 2 + z v 2 ) Dot ProductVU = [x v, y v, z v ] [x u, y u, z u ] = x v x u + y v y u + z v z u = ||V|| ||U|| cos ß Cross ProductV x U = [v y u z - v z u y, -v x u z + v z u x, v x u y - v y u x ] V x U = - ( U x V) Direction of resulting vector depends on coordinate system and order of vectors.

©Larry F. Hodges (modified by Amos Johnson) 5 Derivation of Plane Equation To derive equation of the plane given three points: P 1, P 2, P 3 [ P 3 - P 1 ] x [ P 2 - P 1 ] = N, orthogonal vector Given a general point P = (x,y,z) N [P - P 1 ] = 0 if P is in the plane. Or given a point (x,y,z) in the plane and normal vector N then N [x,y,z] = -D

©Larry F. Hodges (modified by Amos Johnson) 6 Equation of a plane Ax + By + Cz + D = 0 Alternate Form:A'x + B'y + C'z +D' = 0 where A' = A/d, B' = B/d, C' = C/d, D' = D/d d = sqrt(A 2 + B 2 + C 2 ) Distance between a point and the plane is given by A'x + B'y + C'z +D' (sign indicates which side) Given Ax + By + Cz + D = 0 Then [A, B, C] is a normal vector Pf: Given two point P 1 and P 2 in the plane, the vector [ P 2 - P 1 ] is in the plane and [A,B, C] [ P 2 - P 1 ] = (Ax 2 + By 2 +Cz 2 ) - (Ax 1 + B y 1 + Cz 1 ) = ( - D ) - ( - D ) = 0

©Larry F. Hodges (modified by Amos Johnson) 7 Basic Transformations Translation Scale Rotation Shear

©Larry F. Hodges (modified by Amos Johnson) 8 Translation in Homogeneous Coordinates [T][P] = (x + t x, y + t y, z + t z ) (100t x )(x) (010t y )(y) (001t z )(z) (0001 )(1) T P

©Larry F. Hodges (modified by Amos Johnson) 9 Scale [S][P] = (s x x, s y y, s z z) (s x 000)(x) (0s y 00)(y) (00s z 0)(z) (0001)(1) Note: A scale may also translate an object!

©Larry F. Hodges (modified by Amos Johnson) 10 Rotations Positive Rotations are defined as follows Axis of rotation isDirection of positive rotation is xy to z yz to x zx to y

©Larry F. Hodges (modified by Amos Johnson) 11 Rotations About the z axisR z (ß) P = (cosß-sinß00)(x) (sinßcosß00)(y) (0010)(z) (0001)(1) About the x axisR x (ß) P = (1000)(x) (0cosß-sinß0)(y) (0sinßcosß0)(z) (0001)(1) About the y axis R y (ß) P = ( cosß0sinß0)(x) (0100)(y) (-sinß0cosß0)(z) (0001)(1)

©Larry F. Hodges (modified by Amos Johnson) 12 Shears xy Shear SH xy P = (10sh x 0)(x) (01sh y 0)(y) (0010)(z) (0001)(1)

©Larry F. Hodges (modified by Amos Johnson) 13 A Rotation Φ About An Arbitrary Axis Z P1P1 P2P2 Y X

©Larry F. Hodges (modified by Amos Johnson) 14 A Rotation Φ About An Arbitrary Axis 1. Translate one end of the axis to the origin [P 2 -P 1 ] = [ u 1, u 2, u 3 ] Z P1P1 P2P2 Y X

©Larry F. Hodges (modified by Amos Johnson) 15 A Rotation Φ About An Arbitrary Axis a = sqrt(u u 3 2 ) b = sqrt(u u 2 2 ) c = sqrt(u u 3 2 ) cosß = u 3 /a sinß = u 1 /a 1. Translate one end of the axis to the origin [P 2 -P 1 ] = [ u 1, u 2, u 3 ] Z Y X b a c u1u1 u2u2 u3u3 ß U

©Larry F. Hodges (modified by Amos Johnson) Rotate the coordinate axes about the y-axis an angle -ß After R y (-ß), U lies in the y-z plane Z Y X b a c u1u1 u2u2 u3u3 Z Y X µ u2u2 a ß U U

©Larry F. Hodges (modified by Amos Johnson) Rotate the coordinate axes about the x-axis through an angle µ to align the z-axis with U R x (µ) cos µ = a/ ||u|| U Z Y X µ U Z Y X After R x ( µ ), U lies on the z-axis

©Larry F. Hodges (modified by Amos Johnson) When U is aligned with the z- axis, apply the original rotation, Φ, about the z-axis. 5. Apply the inverses of the transformations in reverse order.

©Larry F. Hodges (modified by Amos Johnson) 19 A Rotation Φ About an Arbitrary Axis R z ()][ [T -1 ][Ry(ß)][R x (-µ)][R z (Φ)][R x (µ)][R y (-ß)][T][P] Note: P = 3D Point T -1 = opposite translate from T [ ] = matrix