Geometric Transformations In 3D And Coordinate Frames

2y ago
17 Views
3 Downloads
631.61 KB
33 Pages
Last View : 9d ago
Last Download : 3m ago
Upload by : Milo Davies
Transcription

Geometric transformations in 3Dand coordinate framesComputer GraphicsCSE 167Lecture 3

CSE 167: Computer Graphics 3D points as vectors Geometric transformations in 3D Coordinate framesCSE 167, Winter 20202

Representing 3D points using vectors 3D point as 3-vector 3D point using affine homogeneouscoordinates as 4-vectorCSE 167, Winter 20203

Geometric transformations Translation Linear transformations– Scale– Rotation 3D rotations Affine transformation– Linear transformation followed by translation Euclidean transformation– Rotation followed by translation Composition of transformations Transforming normal vectorsCSE 167, Winter 20204

3D translationUsinghomogeneouscoordinatesCSE 167, Winter 20205

3D uniform scaleUsinghomogeneouscoordinatesCSE 167, Winter 20206

3D nonuniform scaleUsinghomogeneouscoordinatesCSE 167, Winter 20207

3D rotation about X-axisCSE 167, Winter 20208

3D rotation about Y-axisCSE 167, Winter 20209

3D rotation about Z-axisCSE 167, Winter 202010

Rotation matrix A rotation matrix is a special orthogonalmatrix– Properties of special orthogonal matricesThe inverse of a specialorthogonal matrix isalso a specialorthogonal matrix Transformation matrix using homogeneouscoordinatesCSE 167, Winter 202011

3D rotations A 3D rotation can be parameterized with threenumbers Common 3D rotation formalisms– Rotation matrix 3x3 matrix (9 parameters), with 3 degrees of freedom– Euler angles 3 parameters– Euler axis and angle 4 parameters, axis vector (to scale)– Quaternions 4 parameters (to scale)CSE 167, Winter 202012

3D rotation, Euler angles A sequence of 3 elemental rotations 12 possible -X-YZ-X-ZZ-Y-XZ-Y-ZTait-Bryan angles, also– Example: Roll-Pitch-Yaw (ZYX convention) Rotation about X-axis, followed byrotation about Y-axis, followed byrotation about Z-axisComposition of rotationsCSE 167, Winter 202013

3D rotation, Euler axis and angle 3D rotation about an arbitrary axis– Axis defined by unit vector Corresponding rotation matrixCross product revisitedCSE 167, Winter 202014

3D affine transformation Linear transformation followed by translationA is test is translationvectorNotes:1. Invert an affine transformation using a general 4x4 matrix inverse2. An inverse affine transformation is also an affine transformationCSE 167, Winter 202015

Affine transformationusing homogeneous coordinatesA is lineartransformationmatrix Translation– Linear transformation is identity matrix Scale– Linear transformation is diagonal matrix Rotation– Linear transformation is special orthogonal matrixCSE 167, Winter 202016

3D Euclidean transformation Rotation followed by translationUsinghomogeneouscoordinatesA Euclideantransformationis an affinetransformation wherethe linear component isa rotationCSE 167, Winter 202017

Inverse Euclidean transformationEuclidean transformationInverse Euclidean transformationUsinghomogeneouscoordinatesAn inverse Euclideantransformationis also a EuclideantransformationUse this instead ofa general 4x4matrix inverseCSE 167, Winter 202018

Composition of transformations Compose geometric transformation bymultiplying 4x4 transformation matricesComposition of two transformationsComposition of n transformationsOrder of matrices is important!Matrix multiplication is not (in general) commutativeCSE 167, Winter 202019

Transforming normal vectors Tangent vector v at surface point X isorthogonal to normal vector n at X Transformed tangent vector and transformednormal vector must also be orthogonalCSE 167, Winter 202020

Transforming normal vectors Tangent vector can be thought of as adifference of points, so it transforms the sameas a surface pointWe are only concerned aboutdirection of vectors, so do notadd translation vector Normal vector does not transform the same astangent vectorHow is M related to A?CSE 167, Winter 202021

Transforming normal vectors How is M related to A? Solve for M Transform normal vectors usingCSE 167, Winter 202022

Coordinate frames In computer graphics, we typically use at least threecoordinate frames– Object (or Model) coordinate frame– World coordinate frame– Camera (or Eye) coordinate frameCameracoordinatesObjectcoordinatesWorld coordinatesBased on slides courtesy of Jurgen SchulzeCSE 167, Winter 202023

Object (or Model) coordinates Local coordinates in which points and otherobject geometry are given Often origin is the geometric center, on thebase, or in a corner of the object– Depends on how object is generated or usedCameracoordinatesObjectcoordinatesWorld coordinatesSource: http://motivate.maths.orgCSE 167, Winter 202024

World coordinates Common reference frame for all objects in the scene No standard for coordinate frame orientation– If there is a ground plane, usually X-Y plane is horizontaland positive Z is up– Otherwise, X-Y plane is often screen plane and positive Z isout of the screenCameracoordinatesObjectcoordinatesWorld coordinatesCSE 167, Winter 202025

Object (or Model) transformation The transformation from object (or model)coordinates to world coordinates is differentfor each object Defines placement of object in scene Given by “model matrix” (model-to-worldtransformation) MCameracoordinatesObjectcoordinatesWorld coordinatesCSE 167, Winter 202026

Camera (or eye) coordinates Origin defines center of projection of camera(or eye) X-Y plane is parallel to image plane Z-axis is orthogonal to image planeCameracoordinatesObjectcoordinatesWorld coordinatesCSE 167, Winter 202027

Camera (or eye) coordinates The “camera matrix” defines thetransformation from camera (or eye)coordinates to world coordinates– Placement of camera (or eye) in worldCameracoordinatesObjectcoordinatesWorld coordinatesCSE 167, Winter 202028

Camera matrix Given:u– Center point of projection e– Look at point d– Camera up vector ueCameracoordinatesdWorld coordinatesCSE 167, Winter 202029

Camera matrix Construct xc, yc, zcueCameracoordinatesdWorld coordinatesCSE 167, Winter 202030

Camera matrix Step 1: Z-axis𝒆 𝒅𝒛𝐶 𝒆 𝒅 Step 2: X-axis𝒖 𝒛𝐶𝒙𝐶 𝒖 𝒛𝐶 Step 3: Y-axis𝒖𝒚𝐶 𝒛𝐶 𝒙𝐶 𝒖 Camera Matrix:𝑪 𝒙𝐶0𝒚𝐶0CSE 167, Winter 2020𝒛𝐶0𝒆131

Transforming object (or model) coordinatesto camera (or eye) coordinates Object to world coordinates: M Camera (or eye) to world coordinates: CUse inverse ofEuclideantransformation(slide 18) insteadof a general 4x4matrix inverseThe “view matrix” definesthe transformation fromworld coordinates tocamera (or eye) coordinatesCSE 167, Winter 2020CameracoordinatesObjectcoordinatesWorld coordinates32

Objects in camera (or eye) coordinates We have things lined up the way we like themon screen– The positive X-axis points to the right– The positive Y-axis points up– The positive Z-axis points out of the screen– Objects to look at are in front of us, i.e., havenegative Z values But objects are still in 3D Next step: project scene to 2D planeCSE 167, Winter 202033

Geometric transformations in 3D Coordinate frames CSE 167, Winter 2020 2. Representing 3D points using vectors 3D point as 3-vector 3D point using affine homogeneous coordinates as 4-vector CSE 167, Winter 2020 3. Geometric transformations Tr

Related Documents:

transformations performing geometric exchanges based on the vertical and horizontal locations. The performance of the geometric transformations on quantum images, GI, is based on the function, G, on the computational basis vectors. The general structure of circuits for geometric transformations

Geometric transformations Geometric transformations will map points in one space to points in another: (x',y',z') f(x,y,z). These transformations can be very simple, such as scaling each coordinate, or complex, such as non-linear twists and bends. We'll focus on transformations that ca

Geometric Transformations Changes in size, shape are accomplished with geometric transformation. It alter the coordinate descriptions of object. The basic transformations are Translation, Roatation, Scaling. Other transformations are Reflection and shear.Basic transformations u

level of abstraction and look at how geometric transformations are used to alter the view of a 2D model: how we can translate, scale, and rotate the model, and how transformations affect what the viewport 'sees' Geometric Transformations Secti

The formula for the sum of a geometric series can also be written as Sn a 1 1 nr 1 r. A geometric series is the indicated sum of the terms of a geometric sequence. The lists below show some examples of geometric sequences and their corresponding series. Geometric Sequence Geometric Series 3, 9, 27, 81, 243 3 9 27 81 243 16, 4, 1, 1 4, 1 1 6 16 .

Jan 26, 2018 · Geometric Transformations, 8DOF Transform Lecture #5 Friday January 26, 2018. Classes of Image Transformations Rigid transformations –Combine rotation and translation –Preserve relative distances and angles –3 Degrees of freedom Similarity transfor

Geometric Transformations These are transformations R2!R2 that include translations dilations rotations re ections projections shearing By using compositions of these, we can create all sorts of transformations. Many of the above can also be de ned as maps Rn!Rn. Applied Linear

Answer questions developed by the test maker . Language Arts – Reading Directions Time 35 minutes 20 Questions This is a test of some of the skills involved in understanding what you read. The passages in this test come from a variety of works, both literary and informational. Each passage is followed by a number of questions. The passages begin with an introduction presenting .