1 / 30

Module 2

Module 2. Prepared by Elizabeth Isaac DCS, RSET. 2D Transformations. Transformation is the back bone of computer graphics. 2D images uses lines, curves.. enables to manipulate the orientation, shape, size and location of the object. Translation Rotation Scaling Reflection Shearing.

rivka
Download Presentation

Module 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Module 2 Prepared by Elizabeth Isaac DCS, RSET

  2. 2D Transformations Transformation is the back bone of computer graphics. 2D images uses lines, curves.. enables to manipulate the orientation, shape, size and location of the object. • Translation • Rotation • Scaling • Reflection • Shearing

  3. Translation • Translation - repositioning an object along a straight-line path from one coordinate location to another. • Rigid-body transformation

  4. Translation Translation distance – tx and ty (tx,ty)-Translation Vector or shift vector.

  5. Translation

  6. Rotation • Rotation - repositions an object along a circular path in the xy plane. Rotation angle- θ pivot point or rotation point (Xr,Yr)

  7. Rotation

  8. Rotation

  9. Rotation

  10. R- rotation matrix X’=Xr+(X-Xr)COS θ –(Y-Yr)SIN θ Y’=Yr+(X-Xr)SIN θ+(Y-Yr)COS θ Translation and rotation move without deformation

  11. 2D Scaling Scaling transformation alter the size of an object. Scaling factor

  12. 2D Scaling • Scaling matrix

  13. 2D Scaling

  14. 2D Scaling • Uniform scaling –same value • Differential scaling

  15. Control the location of a scaled object by choosing a position called-fixed point (Xf ,Yf ).

  16. Reflection • A reflection is a transformation that produces a mirror image of an object. • rotating the object 180 degrees about the reflection axis.

  17. y x Reflection of an object about the x axis Reflection-About the x axis

  18. y x Reflection of an object about the y axis Reflection-About the Y axis

  19. Relative to the coordinate origin

  20. 3 2 1 1 3 2 With respect to the line y = x

  21. 2 1 3 2 1 3

  22. Shear • A transformation that distorts the shape of an object such that the transformed shape appears as if the object were composed of internal layers that had been caused to slide over each other is called a shear

  23. 1 1 Initial object y y 1 1 3 2 shx = 2 x x Shear shear parameter shx

  24. Shear

  25. 1 1 Initial object 3 y y 2 1 1 shy = 2 x x y-direction shear

  26. y-direction shear

  27. y 1 1 x yref = -1 yref = -1 1 1 3 x 2 shx = ½, yref = -1 Shear-x-direction relative to other reference line

  28. Shear-x-direction relative to other reference line

  29. y 1 x 1 xref = -1 xref = -1 y 2 1 x 1 y-direction relative to other reference line

  30. y-direction relative to other reference line

More Related