Skip to main content

Rotate line about Y-axis by 90°

Short answer

Clockwise 90° about y-axis: x' = −z, y' = y, z' = x. P1(10,10,10) → (−10,10,10), P2(20,20,15) → (−15,20,20). The rotated line goes from (−10,10,10) to (−15,20,20).

Perform rotation of a line (10, 10, 10), (20, 20, 15) about Y-axis in clock wise direction by 90 degree.

Rotation about the y-axis by angle θ (counter-clockwise positive, viewed from +y towards the origin):

x' = x cosθ + z sinθ, y' = y, z' = −x sinθ + z cosθ

Clockwise by 90° means θ = −90°, so cosθ = 0 and sinθ = −1:

| x' |   |  0 0 -1 0 | | x |
| y' | = |  0 1  0 0 | | y |
| z' |   |  1 0  0 0 | | z |
| 1  |   |  0 0  0 1 | | 1 |

so x' = −z, y' = y, z' = x.

Pointx' = −zy' = yz' = xResult
P1(10,10,10)−101010(−10, 10, 10)
P2(20,20,15)−152020(−15, 20, 20)

Answer: the line becomes (−10, 10, 10) to (−15, 20, 20).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 4 questions →