Program For Composite 2d Transformation In Computer Graphics
![Program For Composite 2d Transformation In Computer Graphics Program For Composite 2d Transformation In Computer Graphics](https://robertcspencer.files.wordpress.com/2013/08/computer-graphics-7.png)
![2d rotation in computer graphics 2d rotation in computer graphics](https://www.cosc.brocku.ca/Offerings/3P98/course/lectures/2d_3d_xforms/shear.gif)
Composite Transformation:A number of transformations or sequence of transformations can be combined into single one called as composition. The resulting matrix is called as composite matrix. The process of combining is called as concatenation.Suppose we want to perform rotation about an arbitrary point, then we can perform it by the sequence of three transformations. Translation.
![Computer Computer](https://image.slidesharecdn.com/computergraphics-160119055932/95/computer-graphics-34-638.jpg?cb=1492873857)
Rotation. Reverse TranslationThe ordering sequence of these numbers of transformations must not be changed. If a matrix is represented in column form, then the composite transformation is performed by multiplying matrix in order from right to left side. The output obtained from the previous matrix is multiplied with the new coming matrix.
2d Reflection In Computer Graphics C Program With Output
Example showing composite transformations:The enlargement is with respect to center. For this following sequence of transformations will be performed and all will be combined to a single oneStep1: The object is kept at its position as in fig (a)Step2: The object is translated so that its center coincides with the origin as in fig (b)Step3: Scaling of an object by keeping the object at origin is done in fig (c)Step4: Again translation is done. This second translation is called a reverse translation. It will position the object at the origin location.Above transformation can be represented as T V.ST V -1 Note: Two types of rotations are used for representing matrices one is column method.
Another is the row method. Advantage of composition or concatenation of matrix:. It transformations become compact. The number of operations will be reduced.
Rules used for defining transformation in form of equations are complex as compared to matrix.Composition of two translations:Let t 1 t 2 t 3 t 4are translation vectors. They are two translations P 1 and P 2. The matrix of P 1 and P 2 given below. The P 1 and P 2are represented using Homogeneous matrices and P will be the final transformation matrix obtained after multiplication.Above resultant matrix show that two successive translations are additive.Composition of two Rotations: Two Rotations are also additiveComposition of two Scaling: The composition of two scaling is multiplicative. Let S 11 and S 12are matrix to be multiplied.