1 / 30

VIST 375

This week's course covers the mathematical and computational basis for representing spatial positions and relationships through coordinate systems. Topics include 3D cartesian, cylindrical, and spherical coordinates, matrix notation for transformations, scaling, rotation, translation, projection techniques, and vector cross products.

vernonm
Download Presentation

VIST 375

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VIST 375 Foundations of Visualization Week of 10/17/16

  2. Coordinates • A way to talk about spatial positions and relationships • The mathematical and computational basis for representing spatial relationships

  3. Coordinate Systems • 3D • cartesian • cylindrical • spherical

  4. Matrix Notation X’ = aX + bY as [P’] = [A][P] Y’ = cX + dY where [P’] = X’ [A] = a b [P] = X Y’ c d Y

  5. 3D Coordinates • positions • vectors • transformations • projections

  6. Right handed or left handed? • Relationship of the three axes • Applies to 3D cartesian coordinates • Similar axes relationships apply in spherical and cylindrical coordinates y y z right left x x z

  7. 3D Transformations • Scaling, Rotation, Translation • in Matrix Notation [ X’ ] = [ X ] [ T ] or [ X’ ] = [ T ] [ X ] (preferred)

  8. 2D Scaling [ P’ ] = [ S ] [ P ] where [ S ] = Sx 0 0 Sy X’ = Sx*X Y’ = Sy*Y

  9. 3D Scaling X’ = Sx * X Y’ = Sy * Y or Z’ = Sz * Z x’ y’ z’ Sx 0 0 0 Sy 0 0 0 Sz x y z =

  10. 2D Rotation Positive rotation about origin x’ = x cos  - y sin  y’ = x sin  + y cos 

  11. 3D Rotation • About X axis • About Y axis • About Z axis • About “arbitrary” axis

  12. 3D Rotation about the X axis X’ = X Y’ = cos Y - sin Z Z’ = sin Y + cos Z or x y z 1 0 0 0 cos -sin 0 sin cos x’ y’ z’ =

  13. 3D Rotation about the Y axis X’ = cosX + sin Z Y’ = Y Z’ = -sin X + cos Z

  14. 3D Rotation about the Z axis X’ = cos X - sin Y Y’ = sin X + cos Y Z’ = Z

  15. 2D Translation X’ = X + Tx Y’ = Y + Ty • Remenber doesn’t fit the pattern • What to do?

  16. 3D Translations X’ = X + Tx Y’ = Y + Ty Z’ = Z + Tz Requires Homogeneous coordinate to put into matrix form

  17. 2D Homogeneous Translation [ P’ ] = [ T ][ P ] where [ T ] = 1 0 Tx [ P ] = X [ P’] = X’ 0 1 Ty Y Y’ 0 0 1 1 w x’ = X’/w y’ = Y’/w

  18. 3D Homogeneous Translation [ P’ ] = [ T ] [ P ] where x’ = X’/ W y’ = Y’/ W z’ = Z’/ W X’ Y’ Z’ W 1 0 0 Tx 0 1 0 Ty 0 0 1 Tz 0 0 0 1 X Y Z 1 =

  19. Transformation Duality Transforming the point or Transforming the coordinate system?

  20. Transformation Ordering • Order of transformations determines results • For example, translation then rotation is generally not the same as rotation then translation

  21. Projections • Orthogonal • ignores distance from viewer • Perspective • takes viewer distance into account

  22. Orthogonal Projection • 3D world into 2D plane • 3D environment onto 2D screen • Essentially just ignores depth or the Z coordinate

  23. Perspective Projection • Again 3D world into 2D plane, but • Modifies projected x,y position based on distance from eye or z coordinate X x,y,z image plane x’,y’ line of sight eye Z f

  24. Projection Transformation [ P’ ] = [ Mp ][ P ] where [ P’] = [ P ] = [ Mp ] = x’ = X’ / w y’ = Y’/ w z’ = Z’/ w x’ = x / (z / f) y’ = y / (z / f) z’ = f x’ y’ z’ w x y z 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1/f 0

  25. Alternative Form X eye Z d image plane

  26. Alternative Form [P’ ] = [Mp ][P] where [P’] = [P] = [Mp ]= x’ = X’/ w y’ = Y’/ w z’ = 0/w x’ = x/((z/d)+1) y’ = y/((z/d)+1) x’ y’ z’ w x y z 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1/d 1

  27. Projection Matrices Orthogonal Perspective 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1/d 1

  28. 3D Vector Cross Products C = A x B where A, B, and C are all vectors C is normal to the plane of A and B Cx = AyBz-ByAz Cy = AzBx-AxBz Cz = AxBy-BxAy and |C| = |A||B| sin 

  29. Vector Cross Product Can be define as the ‘determinant’ i j k C = Ax Ay Az Bx By Bz where i, j, k are unit vectors in the x, y, z directions

  30. Transformation Concatenation Transformations can be successively applied in matrix form as follows X’ = [ T3 ] [ T2 ] [ T1 ] [ X ] which means X’ = ( [ T3 ] ( [ T2 ] ( [ T1 ] [ X ] ) ) ) or X’ = ( ( ( [ T3 ] [ T2 ] ) [ T1 ] ) [ X ] )

More Related