- Asked 2/25
- 2079 Baisakh · 8 marks
- 2068 Chaitra · 8 marks
Composite matrix: reflection about y=mx+c
Short answer
Reflection about y=mx+c is M=T(0,c)*R(theta)*Ref_x*R(-theta)*T(0,-c), where theta=arctan(m). Simplified, M = 1/(1+m^2) times [[1-m^2, 2m, -2mc], [2m, m^2-1, 2c], [0, 0, 1+m^2]].
Find the composite transformation matrix for reflection about a line y = mx + c.
A line y = mx + c has slope m = tan θ and y-intercept (0, c). A reflection about it is a composite of five basic transformations.
Step 1: translate the line so that it passes through the origin:
T1 = T(0, −c)
Step 2: rotate by −θ so that the line lies along the x-axis,
θ = tan⁻¹(m): R(−θ)
Step 3: reflect about the x-axis: Ref_x
Step 4: rotate back by +θ: R(θ)
Step 5: translate back: T2 = T(0, c)
The composite matrix (column-vector form, applied right to left) is
M = T(0,c) · R(θ) · Ref_x · R(−θ) · T(0,−c)
| 1 0 0 | | cosθ −sinθ 0 | | 1 0 0 | | cosθ sinθ 0 | | 1 0 0 |
| 0 1 c | · | sinθ cosθ 0 | · | 0 −1 0 | · | −sinθ cosθ 0 | · | 0 1 −c |
| 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 | | 0 0 1 |
First, R(θ)·Ref_x·R(−θ) is
| cos²θ − sin²θ 2 sinθ cosθ 0 | | cos2θ sin2θ 0 |
| 2 sinθ cosθ sin²θ − cos²θ 0 | = | sin2θ −cos2θ 0 |
| 0 0 1 | | 0 0 1 |
Including the translations:
| cos2θ sin2θ −c·sin2θ |
M = | sin2θ −cos2θ c(1+cos2θ) |
| 0 0 1 |
Using cos2θ = (1 − m²)/(1 + m²) and sin2θ = 2m/(1 + m²):
| 1−m² 2m −2mc |
M = 1/(1+m²) | 2m m²−1 2c |
| 0 0 1+m² |
Check: the point (0, c) on the line gives x' = (2m·c − 2mc)/(1+m²) = 0 and y' = ((m²−1)c + 2c)/(1+m²) = c, so points on the line do not move. For c = 0, m = 1 it gives [[0,1,0],[1,0,0],[0,0,1]], the reflection about y = x.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- 2D reflection matrices and line y+x=0 · Computer Graphics, chapter 3
- Reflection about y=x as composite · Computer Graphics, chapter 3
- Square to rhombus; reflection about y=x · Computer Graphics, chapter 3
- Composite rotation and shear in 2D · Computer Graphics, chapter 3
- 3D window to viewport transformation · Computer Graphics, chapter 4
- Derive perspective projection matrix · Computer Graphics, chapter 4 · asked 3×
- MOI of common area between y = K√x and y = mx · Applied Mechanics, chapter 4
- Inductance matrix of 500 kV bundled line · High Voltage Engineering, chapter 5 · asked 3×
- Capacitance matrix of 400 kV bundled line · High Voltage Engineering, chapter 5 · asked 2×
- Charge matrix of 400 kV line · High Voltage Engineering, chapter 5