The major difference in 2d and 3d transformations is another dimension. 3d has one more dimension called z axis.
The floor of the room is an example of 2d where in only two dimensions matters, one is length (x axis) and other one breadth (y axis). Lets include the height of the room, now you have three dimensions length , breadth and height which is nothing but 3 dimensions.
In terms of computer graphics, another row or column (z axis) gets added in the matrices and equations of transformations. Three dimension will have x,y and z axis.
Translation equations and matrices. The new coordinates (x’,y’,z’) are given by following equations, where tx, ty and tz are the translation factors.
X’= X + tx
Y’= Y * ty
Z’=Z + tz
and in terms of Matrix
Rotation is not as simple as in 2d transformations. Just remember the two golden rules.
Rule 1– Remember the rotation equations for 2 dimension.
Rule 2- Change x to y and y to z and z to x in the equations obtained after first transformations. X=>Y=>Z=>X.
Rotaiton in 3d can be with respect to x axis , y axis or z axis. If its is done with respect to x axis then x coordinate wont change and if done with respect to y axis then y would remain the same. Similarly z’=z would mean the rotation has been done with respect to z axis.
Remember the rotation equation from 2dimension (2d rotation), where coordinates of x’ and y’ are given as, Add z’=z.
Please note z’=z for rotation with respect to z axis. Write these equation in matrices as follows. Remember – Write coefficients of x from equations above in first column, y in second column and z in third column.
Apply the rule number 2 and change the equations written in rule number 1 as change x=>y, y=>z and z=>x. You will get the following equations, please notice that x remains unchanged.
Write down these equations in the form of a matrix.
Apply the rule number 2 and change the equations obtained in rotation w.r.t x-axis. Change x=>y, y=>z and z=>x. You will get the following equations, please notice that x remains unchanged.
Scaling will have sz as one more factor other than sx and sy. Basic rule will remain the same, if any of the scaling factor is less than 1 then compression happens and if sx,sy or sz > 1 then magnification.
Zoom in and Zoom out are the best examples of the scaling.
Equations:
These can be written in form of matrix as follows.
NOTES UNIT-2 ENTREPRENEURIAL PLANNING CLASS-XII SUBJECT- ENTREPRENEURSHIP
There are two ways by which you can see some objects colorful, let's say RED…
What is the formula of Lorentz force q = charge B = Magnetic Fields E…
MCQs on Electrostatic Potential & Capacitance - Chapter 2 - Class 12 CBSELove to Learn…
A. Which out of the following are conductors Metal Human Body Animal Bodies Earth All…
MCQs with answer explanation on - Solutions Chapter -2 Class 12 Prepared by Experts MCQ…