C program 3d transformation


















Theme images by Storman. Powered by Blogger. Report Abuse. Total Pageviews. Computer Graphics. Next Prev Post. Previous Next Post. Three dimensional transformations are extended from two dimensional transformations by considering the 'z' co-ordinate also in the plane.

Just like two dimensional transformation in three dimensional transformations are formed by composing three basic transformations of translation, scaling and rotation. Here we are going to discuss about the translation. What is translation? A translation transform simply moves every point by a certain amount horizontally and a certain amount vertically. In three dimensional co-ordinate system each vertex have x,y,z.

So, each vertex have three translation factors. But if we use this process we need to translate all the co-ordinates of object. So, we will see the following solutions a Obviously, first by applying series of Transformations one by one over the coordinates of the object sequentially.

First we performed transformation T 1, then P o become transformed to P 1. Secondly, we perform transformation T 2 and the point P 1 become transformed to P 2. Lastly, we perform transformation T 3 and we get the final result i.

Note: Here T 1 , T 2 , T 3 correspond to their transformation matrix condition. Composite Transformation As its name suggests itself composite, here we compose two or more than two transformations together and calculate a resultant R transformation matrix by multiplying all the corresponding transformation matrix conditions with each other.

The same equivalent result that we got over Point P 0 and transformed it into P 3 in the above example can also be achieved by directly multiplying resultant R with the point P 0 rather than performing transformations T 1 , T 2 , and T 3 sequentially one after one. And we end up with the same equivalent result that we got into our above example. Solution: We are given the following cuboid Fig. For coordinate A[0 0 4], the newly translated coordinate would be A 1 : For coordinate B[0 4 2], the newly translated coordinate would be B 1 : For coordinate C[2 4 0], the newly translated coordinate would be C 1 :.

For coordinate E[2 0 0], the newly translated coordinate would be E 1 : For coordinate F[0 0 2], the newly translated coordinate would be F 1 : For coordinate G[2 0 2], the newly translated coordinate would be G 1 :.

For coordinate A 1 [2 3 6], the newly Scaled coordinate would be A 2 : For coordinate B 1 [2 7 4], the newly Scaled coordinate would be B 2 : For coordinate C 1 [4 7 2], the newly Scaled coordinate would be C 2 :. For coordinate D 1 [4 5 6], the newly Scaled coordinate would be D 2 : For coordinate E 1 [4 3 2], the newly Scaled coordinate would be E 2 : For coordinate F 1 [2 3 4], the newly Scaled coordinate would be F 2 :.



0コメント

  • 1000 / 1000