Skip to main content

Halve rectangle ABCD about its centre

Short answer

Scale about fixed point (4,2) using M with sx=sy=0.5: corners become (2,1), (2,3), (6,3), (6,1). For a half-size square, use sx=0.25, sy=0.5 giving (3,1), (3,3), (5,3), (5,1). Center unchanged.

Find the transformation matrix that transforms a rectangle ABCD whose center is at (4,2) so that it is reduced to half of its size, the center remaining the same. The co-ordinates of ABCD are A(0,0), B(0,4), C(8,4) and D(8,0). Find the coordinates of the new square. Also derive the transformation matrix to convert this rectangle to square.

Given: rectangle A(0,0), B(0,4), C(8,4), D(8,0), centre (4,2). The scaling must keep the centre fixed, so it is done about the fixed point (4,2):

M = T(4,2) · S(sx,sy) · T(−4,−2)

      | sx  0   4(1−sx) |
 M =  | 0   sy  2(1−sy) |
      | 0   0      1    |

(a) Reduce to half of its size (sx = sy = 0.5)

      | 0.5  0   2 |
 M =  |  0  0.5  1 |       x' = 0.5x + 2,  y' = 0.5y + 1
      |  0   0   1 |
A(0,0) → (2,1)    B(0,4) → (2,3)    C(8,4) → (6,3)    D(8,0) → (6,1)

The new rectangle is 4 × 2 with the same centre (4,2).

(b) Convert the rectangle to a square (centre unchanged)

The rectangle is 8 wide and 4 high. To get a square of side 4, shrink x by half and keep y: sx = 0.5, sy = 1.

      | 0.5  0   2 |
 M =  |  0   1   0 |
      |  0   0   1 |
A → (2,0)   B → (2,4)   C → (6,4)   D → (6,0)

This is a square of side 4. (Instead, sx = 1, sy = 2 gives a square of side 8.)

(c) Both: half-size square

Reducing to half size and making it a square (side 2) needs sx = 0.25, sy = 0.5:

      | 0.25  0   3 |
 M =  |  0   0.5  1 |
      |  0    0   1 |
A → (3,1)   B → (3,3)   C → (5,3)   D → (5,1)

Answer: the half-size rectangle has corners (2,1), (2,3), (6,3), (6,1); the half-size square has corners (3,1), (3,3), (5,3), (5,1); all with centre (4,2).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 3 questions →