The Ray Tracer Challenge: "Computing the normal on a transformed sphere" ebook test

Yes, you are right.
In my code I choose a fluent API, in witch the order of the matrix multiplications is reversed behind the scene.
So instead of using scaling(1, 0.5, 1).rotation_z(pi/5) (that equals to m = rotation_z * scaling) I should have written the opposite: rotation_z(pi/5).scaling(1, 0.5, 1).

Thank you for your help!

3 Likes