3 Two Dimensional Geometric Transformations

Computer Graphics · Unit 3 · 5 hrs

Two-Dimensional Geometric Transformations

Exam-focused notes for Two-Dimensional Geometric Transformations (Computer Graphics, CSC214): what the TU syllabus asks and how it has actually been tested, with 12 solved past questions from this unit.

What this unit covers

  • Two-Dimensional translation, Rotation, Scaling, Reflection and Shearing
  • Homogeneous Coordinate and 2D Composite Transformations
  • Transformation between Co-ordinate Systems
  • Two Dimensional Viewing: Viewing pipeline, Window to viewport coordinate transformation
  • Clipping: Point, Lines(Cohen Sutherland line clipping, Liang-Barsky Line Clipping), Polygon Clipping(Sutherland Hodgeman polygon clipping)

Clipping

208110 marks

What is the major drawback of Sutherland Hodgeman Polygon Clipping Algorithm? Illustrate with a suitable example. Explain B-spline curve and its properties.[10]

--- The Sutherland-Hodgman algorithm clips a polygon against each edge of the rectangular clipping window one at a time. It processes the polygon vertex list against: 1. Left boundary 2. Right boundary 3. Bottom boundary 4. Top boundary The four inside-outs...

Full solved answer →
208010 marks

Why Liang Barsky Line Clipping Algorithm is efficient than Cohen Sutherland Algorithm? Explain the clipping procedure of Liang Barsky algorithm with suitable example.[10]

The Liang-Barsky algorithm is considered more efficient than Cohen-Sutherland for the following reasons: Basis Cohen-Sutherland Liang-Barsky --------- Approach Uses region codes and repeated intersection calculations Uses parametric form of line; computes p...

Full solved answer →
207910 marks

Write the algorithm for Cohen-Sutherland Line clipping. Clip the polygon A(100,150), B(200,250) and C(300,200) with the clipping window defined by the coordinates (100,300), (300,300) and (200,100) using Sutherland Hodgeman Polygon Clipping algorithm.[10]

Polygon vertices: - $A(100, 150)$ - $B(200, 250)$ - $C(300, 200)$ Clipping window (triangular) vertices: - $W1(100, 300)$ - $W2(300, 300)$ - $W3(200, 100)$ Task: State Cohen-Sutherland line clipping algorithm; clip triangle ABC against triangular window usi...

Full solved answer →
20775 marks

Let ABCD be the rectangle window with A(0, 0), B(10, 0), C(10, 10) and D(0, 10). Use Liang Barsky line clipping algorithm to clip the line XY where X(5, 3) and Y(15, 9). [5]

- Rectangle window: A(0,0), B(10,0), C(10,10), D(0,10) - $x{min}=0,\ x{max}=10,\ y{min}=0,\ y{max}=10$ - Line XY: $X(5,3)$, $Y(15,9)$ - $x1=5,\ y1=3,\ x2=15,\ y2=9$ --- $$\Delta x = x2 - x1 = 15 - 5 = 10$$ $$\Delta y = y2 - y1 = 9 - 3 = 6$$ --- k $pk$ $qk$ ...

Full solved answer →
207510 marks

Define window, viewport and viewing transformation. Let ABCD be the regular window with A(20, 20), B(90, 20), C(90, 70), and D(20, 70). Find the region codes for end points and use Cohen Sutherland algorithm to clip the lines P(10, 30) Q(80, 90).[10]

Window: A rectangular region defined in the world coordinate system that selects the portion of a scene to be displayed. Only objects lying inside the window are shown. Viewport: A rectangular region on the display device (screen, in device/normalized coord...

Full solved answer →
20755 marks

Define clipping. Discuss about cubic spline Interpolation. [5]

--- Clipping is a graphics operation that removes or cuts away portions of graphical objects (lines, polygons, curves, or text) that lie outside a defined viewing region or window. Only the portions of objects that fall within the clipping boundary are reta...

Full solved answer →

Homogeneous Coordinate and 2D Composite Transformations

20815 marks

Given a triangle with vertices A(2,3), B(5,5), C(4,3) by rotating 90 degrees about the origin and then translating two units in each direction. Use the homogeneous transformation matrix to find the new vertices of the triangle. [5]

- Vertices: $A(2,3)$, $B(5,5)$, $C(4,3)$ - Rotation: $\theta = 90°$ about origin (counterclockwise, standard convention) - Translation: $tx = 2$, $ty = 2$ $$R(90°) = \begin{bmatrix} \cos90° & -\sin90° & 0 \\ \sin90° & \cos90° & 0 \\ 0 & 0 & 1 \end{bmatrix} ...

Full solved answer →
20795 marks

Find the composite transformation matrix for reflection about a line y=mx+c. [5]

- Line of reflection: $y = mx + c$ - Slope: $m$ (so inclination angle $\theta = \arctan m$) - y-intercept: $c$ - Working in homogeneous coordinates (3×3 matrices). No specific numeric values are given; this is a derivation problem. --- The line $y = mx + c$...

Full solved answer →

Two-Dimensional translation, Rotation, Scaling, Reflection and Shearing

20805 marks

Reflect a line segment having end points (9,3) and (12,10) about a line X=7. Draw initial and final result graph as well. [5]

- Endpoint $A = (9, 3)$ - Endpoint $B = (12, 10)$ - Mirror line: $X = 7$ (so $a = 7$) $$x' = 2a - x, \qquad y' = y$$ With $a = 7$: $$x' = 14 - x, \qquad y' = y$$ $$x'A = 2(7) - 9 = 14 - 9 = 5$$ $$y'A = 3$$ $$\boxed{A' = (5, 3)}$$ $$x'B = 2(7) - 12 = 14 - 12...

Full solved answer →
20795 marks

Reflect a line segment having endpoints (9,3) and (12,10) about a line Y=7. Draw initial and final result graph as well. [5]

Endpoint Coordinates ----------------------- A (9, 3) B (12, 10) Mirror line: $y = 7$, so $k = 7$. --- For reflection about a horizontal line $y = k$: $$x' = x, \qquad y' = 2k - y$$ With $k = 7$: $$x' = x, \qquad y' = 14 - y$$ $$x'A = 9$$ $$y'A = 14 - 3 = 1...

Full solved answer →
20785 marks

Find the new c-coordinate of the triangle ABC, with co-ordinates A(0, 0), B(1, 1) and C(5, 2) after it has been magnified to twice of its size. [5]

Given data: - Triangle vertices: - $A(0, 0)$ - $B(1, 1)$ - $C(5, 2)$ - Transformation: magnify to twice the size, so scaling factors $Sx = 2$, $Sy = 2$ The question specifically asks for the new C-coordinate. --- Uniform scaling by factor 2 (about the origi...

Full solved answer →
20775 marks

Translate a triangle ABC with co-ordinates A(0, 0), B(5, 0) and C(5, 5) by 2 units in x-direction and 3 units in y-directions. [5]

- Triangle vertices: $A(0, 0)$, $B(5, 0)$, $C(5, 5)$ - Translation: $tx = 2$ (x-direction), $ty = 3$ (y-direction) Translation formula: $$x' = x + tx, \qquad y' = y + ty$$ Homogeneous translation matrix: $$T = \begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & 3 \\ 0 & 0...

Full solved answer →