Download presentation

Presentation is loading. Please wait.

Published byVictoria Mitchell Modified over 3 years ago

1
**3D Transformations Assist. Prof. Dr. Ahmet Sayar**

Computer Engineering Department Computer Graphics Course Kocaeli University Fall 2012

2
**Extending From 2d Approach**

Methods for geometric transformations in three dimensions are extended from two-dimensional methods by including considerations for the z coordinate. A three-dimensional position, expressed in homogeneous coordinates, is represented as a four-element column vector. Thus , each geometric transformation operator is now 4 by 4 matrix.

3
Translation

4
**Rotation: z-axis rotation**

3D Coordinate-Axis Rotations z-axis rotation (counter-clockwise)

5
**Rotation: x-axis rotation**

counter-clockwise

6
**Rotation: y-axis rotation**

counter-clockwise

7
**Scaling Change the coordinates of the object by scaling factors. y x z**

8
**Scaling with respect to a Fixed Point**

Translate to origin, scale, translate back y x y y y x x x z z z z Translate Scale Translate back

9
**Scaling with respect to a Fixed Point**

10
**Reflection Reflection over planes, lines or points y y y y x x x x z z**

11
Shear Deform the shape depending on another dimension

12
Advanced Topics

13
**1. Rotation Around a Parallel Axis**

Translate the object so that the rotation axis coincides with the parallel coordinate axis Perform the specified rotation about that axis Translate the object so that rotation axis is moved back to its original A coordinate position P is transformed with the sequence -1

14
**Rotation Around a Parallel Axis**

Rotating the object around a line parallel to one of the axes: Translate to axis, rotate, translate back. y y y y x x x x z z z z Translate Rotate Translate back

15
**2. Rotation Around an Arbitrary Axis**

In this case, we also need rotation to align the rotation axis with a selected coordinate axis and then to bring the rotation axis back to its original orientation A rotation axis can be defined with two coordinate position, or one position and direction angles. Now we assume that the rotation axis is defined by two points, and that the direction of rotation is to be counter clockwise when looking along the axis from p2 to p1.

16
**Rotation Around an Arbitrary Axis**

Translate the object so that the rotation axis passes though the origin Rotate the object so that the rotation axis is aligned with one of the coordinate axes Make the specified rotation Reverse the axis rotation Translate back x z

17
**Rotation Around an Arbitrary Axis**

18
**Rotation Around an Arbitrary Axis**

u is the unit vector along V: First step: Translate P1 to origin: Next step: Align u with the z axis we need two rotations: rotate around x axis to get u onto the xz plane, rotate around y axis to get u aligned with z axis.

19
**Rotation Around an Arbitrary Axis**

Align u with the z axis 1) rotate around x axis to get u into the xz plane, 2) rotate around y axis to get u aligned with the z axis y y u α x x u β z z

20
**No need to study Advanced Topics**

BACKUP Slides No need to study Advanced Topics

21
**Rotation Around an Arbitrary Axis**

Align u with the z axis 1) rotate around x axis to get u into the xz plane, 2) rotate around y axis to get u aligned with the z axis y y y u u u' α α x x x u uz β z z z

22
**Dot product and Cross Product**

v dot u = vx * ux + vy * uy + vz * uz. That equals also to |v|*|u|*cos(a) if a is the angle between v and u vectors. Dot product is zero if vectors are perpendicular. v x u is a vector that is perpendicular to both vectors you multiply. Its length is |v|*|u|*sin(a), that is an area of parallelogram built on them. If v and u are parallel then the product is the null vector.

23
**Rotation Around an Arbitrary Axis**

Align u with the z axis 1) rotate around x axis to get u into the xz plane, 2) rotate around y axis to get u aligned with the z axis We need cosine and sine of α for rotation u u' α x uz z Projection of u on yz plane

24
**Rotation Around an Arbitrary Axis**

Align u with the z axis 1) rotate around x axis to get u into the xz plane, 2) rotate around y axis to get u aligned with the z axis u β x u''= (a,0,d) z

Similar presentations

Presentation is loading. Please wait....

OK

Computer Graphics: 3D Transformations

Computer Graphics: 3D Transformations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on power grid failures Ppt on van de graaff generator demonstrations Ppt on natural and artificial satellites of india Ppt on edge detection tutorial Ppt on paintings and photographs related to colonial period years Ppt on inventory turnover ratio Ppt on meeting skills ppt Ppt on email etiquettes presentation church Ppt on electricity generation from municipal solid waste Ppt on waves tides and ocean currents