CSCI 425/525 1 3-D Mathematical Preliminaries. CSCI 425/525 2 Coordinate Systems Z X Y Y X Z Right-handed coordinate system Left-handed coordinate system.

Slides:



Advertisements
Similar presentations
Computer Graphics: 3D Transformations
Advertisements

1 Computer Graphics Chapter 8 3D Transformations.
General Physics (PHYS101)
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Invariants. Definitions and Invariants A definition of a class means that given a list of properties: –For all props, all objects have that prop. –No.
2D/3D Geometric Transformations CS485/685 Computer Vision Dr. George Bebis.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
Ch. 2: Rigid Body Motions and Homogeneous Transforms
3D Coordinate Systems and Transformations Revision 1
3-D Geometry.
1 Computer Graphics Chapter 5 Vector Based Algorithms.
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,
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
Recap of linear algebra: vectors, matrices, transformations, … Background knowledge for 3DM Marc van Kreveld.
5.2 Three-Dimensional Geometric and Modeling Transformations 2D3D Consideration for the z coordinate.
1.1 – 1.2 The Geometry and Algebra of Vectors.  Quantities that have magnitude but not direction are called scalars. Ex: Area, volume, temperature, time,
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Geometric Transformations Jehee Lee Seoul National University.
2D 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.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 5.
©Larry F. Hodges (modified by Amos Johnson) 1 3-D Mathematical Preliminaries & Transformations.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Geometric Objects and Transformation
CS654: Digital Image Analysis Lecture 6: Basic Transformations.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
Two-Dimensional Geometric Transformations ch5. 참조 Subjects : Basic Transformations Homogeneous Coordinates Composite Transformations Other Transformations.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
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
Affine Geometry.
Part II Plane Equation and Epipolar Geometry. Duality.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Digital Image Processing Additional Material : Imaging Geometry 11 September 2006 Digital Image Processing Additional Material : Imaging Geometry 11 September.
Instructor: Mircea Nicolescu Lecture 9
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.
Geometric Transformations. Transformations Linear transformations Rigid transformations Affine transformations Projective transformations T Global reference.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
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.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
Image Warping 2D Geometric Transformations
3D Geometry and Transformations
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
3D Geometric Transformation
Do Now.
3. Transformation
Review: Transformations
3D Transformation.
Review: Transformations
Geometrical Transformations
Reflections Geometry.
Translation in Homogeneous Coordinates
Presentation transcript:

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

CSCI 425/ D Vectors Have length and directionV = [x v, y v, z v ] Length is given by the Euclidean Norm||V|| =  ( 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.

CSCI 425/525 4 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

CSCI 425/525 5 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 =  (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

CSCI 425/525 6 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

CSCI 425/525 7 Basic Transformations Translation Scale Rotation

CSCI 425/525 8 Translation in Homogeneous Coordinates TP = (x + t x, y + t y, z + t z ) TP

CSCI 425/525 9 Scale SP = (s x x, s y y, s z z) Note: A scale may also translate an object!

CSCI 425/ Rotations Positive Rotations are defined as follows Axis of rotation isDirection of positive rotation is xy to z yz to x zx to y

CSCI 425/ Rotations About the z axisR z (ß) P = About the x axisR x (ß) P = About the y axis R y (ß) P =

CSCI 425/ Shears xy Shear SH xy P = ZZ X X Y Y

CSCI 425/ Mapping a 4D point into R 3 If Tr is any transformation, then it is possible that the 4 th component of the point will not be 1. TrP = Tr(x,y,z,1) = (x', y', z',w) P plotted = (x'/w, y'/w, z'/w) Transformations may be appended together via matrix multiplication.

CSCI 425/ Rotation About An Arbitrary Axis a =  (u u 3 2 ) b =  (u u 2 2 ) c =  (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 P1P1 P2P2 Y X b a c u1u1 u2u2 u3u3 ß U

CSCI 425/ Rotate the coordinate axes about the y-axis an angle -ß After R y (-ß), µ lies in the y-z plane Z Y X b a c u1u1 u2u2 u3u3 Z Y X µ u2u2 a ß

CSCI 425/ Rotate the coordinate axes about the x-axis through an angle µ to align the z-axis with U R x (µ) cos µ = a/ ||u|| sinµ = u 2 / ||u|| R 4. When u is aligned with the z-axis, apply the original rotation, R, about the z-axis. 5.Apply the inverses of the transformations in reverse order. Z Y X µ U

CSCI 425/ Rotation About an Arbitrary Axis R T -1 R y (ß)R x (-µ)RR x (µ)R y (-ß)T P

CSCI 425/ Transformation Types A transformation maps points in one coordinate system to points in another coordinate system. Rigid body transformations Do not distort shapes – line lengths and angles are preserved Rotations, Translations, and combinations of both

CSCI 425/ Affine Transformation Properties Affine transformations –Keep parallel lines and planes parallel. Parallelograms map into oter parallelograms. –but do not necessarily preserve line lengths or angles –Preserve collinearity and “flatness” so the image of a plane or line is another plane or line. –Rotations, Translations, Scales, Shears, and combinations of these