ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Computer Graphics
    ITEC4128
    Progress0 / 15 topics
    Topics
    1. Introduction to Computer Graphics2. Graphics Systems3. Point and Line Drawing Techniques4. Circle Drawing Techniques5. Ellipse and Other Curves6. 2D Transformations7. Clipping8. 3D Concepts9. 3D Transformations10. Perspective Projection11. Triangles and Planes12. Triangle Rasterization13. Lighting14. Introduction to OpenGL15. Animations
    ITEC4128›2D Transformations
    Computer GraphicsTopic 6 of 15

    2D Transformations

    4 minread
    664words
    Beginnerlevel

    📘 2D Transformations — Exam Notes


    🔹 1. Introduction

    2D Transformations are operations used to change the position, size, or orientation of objects in a two-dimensional plane (X–Y plane).

    👉 These transformations are widely used in graphics applications like animation, games, and design.


    🔹 2. Basic Idea

    A point in 2D is represented as: [ P(x, y) ]

    After transformation, it becomes: [ P'(x', y') ]


    🔹 3. Types of 2D Transformations


    🔸 3.1 Translation (Shifting)

    ✔️ Definition

    Moves an object from one position to another without changing its shape or size.


    ✔️ Formula

    [ x' = x + t_x,\quad y' = y + t_y ]

    Where:

    • (t_x), (t_y) = translation distances

    ✔️ Example

    If (P(2,3)), (t_x=4), (t_y=1): [ P' = (6,4) ]


    ✔️ Matrix Form (Homogeneous Coordinates)

    [ \begin{bmatrix} x'
    y'
    1 \end{bmatrix}

    \begin{bmatrix} 1 & 0 & t_x
    0 & 1 & t_y
    0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x
    y
    1 \end{bmatrix} ]


    🔸 3.2 Scaling (Resizing)

    ✔️ Definition

    Changes the size of an object.


    ✔️ Formula

    [ x' = x \cdot s_x,\quad y' = y \cdot s_y ]

    Where:

    • (s_x), (s_y) = scaling factors

    ✔️ Types

    • Uniform Scaling: (s_x = s_y)
    • Non-uniform Scaling: (s_x \neq s_y)

    ✔️ Matrix Form

    [ \begin{bmatrix} s_x & 0 & 0
    0 & s_y & 0
    0 & 0 & 1 \end{bmatrix} ]


    🔸 3.3 Rotation

    ✔️ Definition

    Rotates an object around the origin (or any point).


    ✔️ Formula (about origin)

    [ x' = x \cos\theta - y \sin\theta ] [ y' = x \sin\theta + y \cos\theta ]


    ✔️ Matrix Form

    [ \begin{bmatrix} \cos\theta & -\sin\theta & 0
    \sin\theta & \cos\theta & 0
    0 & 0 & 1 \end{bmatrix} ]


    ✔️ Important Points

    • Positive angle → Anti-clockwise rotation
    • Negative angle → Clockwise rotation

    🔸 3.4 Reflection

    ✔️ Definition

    Flips an object across a line (mirror effect).


    ✔️ Types & Matrices

    1. About X-axis [ (x, y) \rightarrow (x, -y) ]

    2. About Y-axis [ (x, y) \rightarrow (-x, y) ]

    3. About Origin [ (x, y) \rightarrow (-x, -y) ]


    🔸 3.5 Shearing

    ✔️ Definition

    Distorts the shape of an object by shifting one coordinate.


    ✔️ Types

    Horizontal Shear

    [ x' = x + sh_x \cdot y,\quad y' = y ]

    Vertical Shear

    [ x' = x,\quad y' = y + sh_y \cdot x ]


    ✔️ Matrix Form (Horizontal)

    [ \begin{bmatrix} 1 & sh_x & 0
    0 & 1 & 0
    0 & 0 & 1 \end{bmatrix} ]


    🔹 4. Homogeneous Coordinates (Important)

    ✔️ Definition

    A system that represents 2D points using 3 coordinates (x, y, 1) to simplify matrix operations.


    ✔️ Advantages

    • All transformations can be represented using matrices
    • Easy to combine multiple transformations

    🔹 5. Composite Transformations

    ✔️ Definition

    Combining two or more transformations into one.


    ✔️ Example

    Rotate → then translate

    👉 Multiply matrices in correct order: [ T = T_2 \cdot T_1 ]


    ✔️ Important Rule

    ⚠️ Order matters! Changing order changes result.


    🔹 6. Rotation About an Arbitrary Point

    ✔️ Steps

    1. Translate point to origin
    2. Perform rotation
    3. Translate back

    🔹 7. Diagram Descriptions

    ✔️ Translation

    • Show object before and after shifting

    ✔️ Scaling

    • Show same object larger/smaller

    ✔️ Rotation

    • Show object rotating around origin

    ✔️ Reflection

    • Show mirror image across axis

    ✔️ Shearing

    • Show slanted shape

    🔹 8. Applications of 2D Transformations

    • Animation
    • Game development
    • Image processing
    • CAD systems
    • GUI design

    🔹 9. Important Terms

    • Transformation Matrix: Matrix used to perform operation
    • Homogeneous Coordinates: Extended coordinate system
    • Composite Transformation: Combination of transformations

    📝 Likely Exam Questions

    1. Define 2D transformations.
    2. Explain translation with matrix representation.
    3. Describe scaling and its types.
    4. Explain rotation with formulas.
    5. What is reflection? Explain types.
    6. Define shearing with examples.
    7. What are homogeneous coordinates?
    8. Explain composite transformations.
    9. How do you rotate about an arbitrary point?
    10. Solve a numerical on transformation.

    ⚡ Quick Revision Summary

    • 2D Transformations modify position, size, or shape

    • Main types:

      • Translation
      • Scaling
      • Rotation
      • Reflection
      • Shearing
    • Use matrices + homogeneous coordinates

    • Order matters in composite transformations

    • Widely used in graphics & animation


    Previous topic 5
    Ellipse and Other Curves
    Next topic 7
    Clipping

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time4 min
      Word count664
      Code examples0
      DifficultyBeginner