Sunteți pe pagina 1din 2

Transformation It is the ability to simulate the manipulation of obje cts in space.This simulated spatial manipulation is referred to as Transformatio n.

Transformation is useful in areas of the image synthesis process.Example. View ing transformation. Types of Transformation 1.Geometric Transformation 2.Coordinate Transformation 1.Geometric Transformation: The object itself is transferred r elative to a stationary coordinate system or background. This is referred as Geo metric Transformation. 2.Coordinate Transformation: The object is held stationary wh ile the coordinate system is transformed relative to the object.This is referred as Coordinate transformation. Basic Types Of Transformation 1.Translation 2.Rotation 3.Scaling These basic transformations can also be combined to obtain more complex transfor mations. In order to make the representation of these complex transformations ea sier to understand and more efficient, we introduce the idea of homogenous coord inates. 1.Translation: In translation an object is displaced a given distance an d direction from its original position. If the displacement is given by the vect or v = txI + tyJ, the new object point P'(x', y') can be found by applying the t ransformation Tv to P(x, y). See the figure below P' = Tv(P) where x' = x + tx and y' = y + ty. As an example, consider a triangle defined by three vertices (20,0), (60, 0), an d (40, 100) being translated 100 units to the right along the x-axis ( tx = 100) and 10 units up along the y-axis (ty = 10). The new vertices are (120, 10), (16 0, 10), and (140, 110), see figure below: Matrix/Vector Representation of Translations A translation can also be represented by a pair of numbers, t=(tx,ty) where tx i s the change in the x-coordinate and ty is the change in y coordinate. To transl ate the point p by t, we simply add to obtain the new (translated) point q = p + t. q = p + t = + = 2. Rotation In rotation, the object is rotated about the origin. The convention is that the d irection of the rotation is CCW if is a positive angle and CW if the is a negati ve angle. The transformation for rotation R is P' = R(P) where x' = x cos() - y sin() and y' = x sin() + y cos() For example a triangle (20,0), (60,0), (40,100) rotated 45 clockwise about the or

igin is (14.14, -14.14), (42.43, -42.43), (98.99, -42.43) Matrix/Vector Representation of Translations counterclockwise rotation of a degrees = 3.Scaling Scaling is the process of expanding or compressing the dimensions of an object. Positive scaling constants Sx and Sy are used to describe changes in length with respect to the x direction and y direction. A scaling constant > 1 creates an e xpansion (magnification) of length, and < 1 a compression (reduction) of length. Scaling occurs along the x-axis and y-axis to create a new point from the origi nal. This is achieved using the following transformation: P' = TSx,Sy (P), where x' = Sx * x ,and y' = Sy * y If Sx and Sy are not equal, they have the effect of distorting pictures by elong ating or shrinking them along the directions parallel to the coordinate axes. Th e mirror image of an object can be generated by using the negative values for Sx and Sy. Matrix/Vector Representation of Scaling Scaling transformations are represented by matrices. scale matrix: s =

S-ar putea să vă placă și