---
title: "Composite rotation and shear in 2D"
subject: "Computer Graphics"
chapter: 3
key: "semester_5/computer_graphics:composite-rotation-and-shear-2d"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/composite-rotation-and-shear-2d
site: BCT Engineering
---

# Composite rotation and shear in 2D

Computer Graphics · Chapter 3: Two –Dimensional Transformations

- Asked in: 2082 Kartik (new course), 4 marks
- Video: [Composite Transformation with NUMERICAL example | Computer Graphics](https://www.youtube.com/watch?v=hLdDLcue2nE) — Abhishek Sharma
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/composite-rotation-and-shear-2d
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-3

## Question

Explain the composite rotation in 2D transformation. Given the points (0,0), (1,0), (0,1) and (1,1) where Xref = -1 and Shy = 0.5, calculate and sketch the shearing transformation new coordinates.

## Short answer

Composite rotation: successive rotations add angles, R(θ1)·R(θ2)=R(θ1+θ2). For shear with xref=-1, shy=0.5, x'=x, y'=y+0.5(x+1). New coordinates: (0,0.5), (1,1), (0,1.5), (1,2).

## Answer

#### Composite rotation
When two or more rotations are applied one after another, they can be combined into one matrix by multiplication. Two successive rotations by θ1 and θ2 about the origin give

```text
R(θ2)·R(θ1) = R(θ1 + θ2)
```
because the angles add. The order does not matter for rotations about the same point. Rotation about an arbitrary pivot (xr, yr) is a composite of a translation, a rotation and a translation back: T(xr,yr)·R(θ)·T(−xr,−yr).

#### Shear (y-direction shear relative to the reference line x = xref)
```text
x' = x
y' = y + shy·(x − xref)

| 1    0   0          |
| shy  1  −shy·xref   |
| 0    0   1          |
```
With xref = −1 and shy = 0.5: y' = y + 0.5(x + 1).

| Point | Calculation | New point |
|---|---|---|
| (0,0) | y' = 0 + 0.5(0 + 1) = 0.5 | (0, 0.5) |
| (1,0) | y' = 0 + 0.5(1 + 1) = 1 | (1, 1) |
| (0,1) | y' = 1 + 0.5(0 + 1) = 1.5 | (0, 1.5) |
| (1,1) | y' = 1 + 0.5(1 + 1) = 2 | (1, 2) |

```text
 y
 2.0 |          * (1,2)
     |        / |
 1.5 * (0,1.5)  |
     |          |
 1.0 |          * (1,1)
     |        /
 0.5 * (0,0.5)
     |
 0.0 +----------+---- x
     0          1
```
The unit square becomes a parallelogram with vertices (0,0.5), (1,1), (1,2), (0,1.5). The vertical sides stay vertical and keep length 1, while the horizontal sides tilt upward with slope 0.5.

**Answer: (0,0.5), (1,1), (0,1.5), (1,2).**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is R(θ2)·R(θ1)?
   A. R(θ1 + θ2)
   B. R(θ1 · θ2)
   C. R(θ1 - θ2)
   D. T(θ1+θ2)
   Answer: A. Angles add. (Key point: Successive rotations)

2. For y-direction shear about x = xref?
   A. x' = x + shy(y - xref)
   B. y' = y + shy(x - xref), x' = x
   C. y' = shy·y
   D. y' = y + shy·xref
   Answer: B. Y changes in proportion to distance from the reference line. (Key point: Shear formula)

3. With xref = -1, shy = 0.5, where does (1,1) go?
   A. (1, 1.5)
   B. (1, 1)
   C. (1, 2)
   D. (2, 1)
   Answer: C. y' = 1 + 0.5·2 = 2. (Key point: Computation)

4. What shape results from the unit square?
   A. Rhombus rotated
   B. Larger square
   C. Triangle
   D. Parallelogram with vertical sides unchanged
   Answer: D. x unchanged so vertical sides stay vertical. (Key point: Shape)

## Related in Computer Graphics

- [Rotation about a pivot point](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arotation-about-pivot-point-derive) — Computer Graphics, chapter 3, asked 2×
- [3D shearing and matrix](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Awhat-is-3d-shearing) — Computer Graphics, chapter 4, asked 3×
- [Shear unit cube w.r.t. yz plane](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acube-shear-yz-constant-2) — Computer Graphics, chapter 4, asked 4×
- [Shear cube w.r.t. ZX plane, constant 3](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Acube-shear-zx-constant-3) — Computer Graphics, chapter 4, asked 4×
- [2D reflection matrices and line y+x=0](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Areflection-matrices-axes-y-plus-x) — Computer Graphics, chapter 3
- [Composite matrix: reflection about y=mx+c](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Areflection-about-y-mx-c) — Computer Graphics, chapter 3, asked 2×

## Related in other subjects

- [Stagnation points in 2D velocity field](https://www.bctengineer.com/question.md?key=semester_3%2Ffluid_mechanics%3Astagnation-points-velocity-field) — Fluid Mechanics, chapter 4
- [Gale's table, coordinates of all points](https://www.bctengineer.com/question.md?key=semester_4%2Fsurveying_ii%3Agale-table-abcde-2075b) — Surveying II, chapter 1
- [Composite curve R=400 m, Ls=90 m, IP 1+400](https://www.bctengineer.com/question.md?key=semester_4%2Fsurveying_ii%3Acomposite-curve-r400-ls90-ip-1400) — Surveying II, chapter 6
- [Coordinates of X from S, D, C](https://www.bctengineer.com/question.md?key=semester_4%2Fsurveying_ii%3Aresection-sdc-theodolite-2077c) — Surveying II, chapter 5
