11/24/2016 3DTransformation
3DTransformation
Advertisements
PreviousPage NextPage
Rotation
3D rotation is not same as 2D rotation. In 3D rotation, we have to specify the angle of
rotationalongwiththeaxisofrotation.Wecanperform3DrotationaboutX,Y,andZaxes.
Theyarerepresentedinthematrixformasbelow
1 0 0 0 cos 0 sin 0
0 cos sin 0 0 1 0 0
Rx () = Ry () = Rz ()
0 sin cos 0 sin 0 cos 0
0 0 0 1 0 0 0 1
cos sin 0 0
sin cos 0 0
=
0 0 1 0
0 0 0 1
Thefollowingfigureexplainstherotationaboutvariousaxes
[Link] 1/6
11/24/2016 3DTransformation
Scaling
[Link],you
either expand or compress the dimensions of the object. Scaling can be achieved by
multiplying the original coordinates of the object with the scaling factor to get the desired
result.Thefollowingfigureshowstheeffectof3Dscaling
In 3D scaling operation, three coordinates are used. Let us assume that the original
coordinates are (X, Y, Z), scaling factors are (S X, S Y , S z ) respectively, and the produced
coordinatesare(X,Y,Z).Thiscanbemathematicallyrepresentedasshownbelow
Sx 0 0 0
0 Sy 0 0
S =
0 0 Sz 0
0 0 0 1
P=PS
[Link] 2/6
11/24/2016 3DTransformation
Sx 0 0 0
0 Sy 0 0
[X Y Z 1] = [X Y Z 1]
0 0 Sz 0
0 0 0 1
= [X. S x Y . Sy Z . Sz 1]
Shear
[Link]
in2Dshear,wecanshearanobjectalongtheXaxis,Yaxis,orZaxisin3D.
Asshownintheabovefigure,[Link]
P',whichcanberepresentedin3Dmatrixformasbelow
y z
1 shx shx 0
x z
shy 1 shy 0
Sh =
x y
shz shz 1 0
0 0 0 1
P=PSh
y z
X = X + S hx Y + S hx Z
x z
Y = S hy X + Y + shy Z
x y
Z = S hz X + S hz Y + Z
TransformationMatrices
[Link]
multiplied with the coordinate of objects. Usually 3 x 3 or 4 x 4 matrices are used for
[Link] 3/6
11/24/2016 3DTransformation
[Link],considerthefollowingmatrixforvariousoperation.
y z
1 0 0 0 Sx 0 0 0 1 sh x sh x 0
x z
0 1 0 0 0 Sy 0 0 sh y 1 sh y 0
T = S = Sh =
x y
0 0 1 0 0 0 Sz 0 sh z sh z 1 0
tx ty tz 1 0 0 0 1 0 0 0 1
TranslationMatrix ScalingMatrix ShearMatrix
1 0 0 0 cos 0 sin 0 cos sin 0 0
0 cos sin 0 0 1 0 0 sin cos 0 0
Rx () = Ry () = Rz () =
0 sin cos 0 sin 0 cos 0 0 0 1 0
0 0 0 1 0 0 0 1 0 0 0 1
RotationMatrix
PreviousPage NextPage
Advertisements
MATLABTrainingCourses
EnhanceYourSkillswithMATLAB.
Download2016CourseCatalogNow.
[Link]/MATLAB-
Training
Write for us FAQ's Helping Contact
[Link] 4/6
11/24/2016 3DTransformation
Copyright 2016. All Rights Reserved.
Enter email for newsletter go
[Link] 5/6
11/24/2016 3DTransformation
[Link] 6/6