I'm trying to wrap my head around 3D graphics and so far so good but I'm really struggling to fully understand 3D transformations. I've played around with the rotation matrixes and for this for example for rotation around the x-axis and can follow the calculations that leads up to it:
y' = y * cos($\theta$) - z * sin($\theta$)
Where $\theta$ is the angle of rotation.
But what I can't find is why this is required compared to just calculating:
y' = y * cos($\theta$)
In what situations is the "-z * sin($\theta$) required and why? Am I on the right track thinking that the left in this pictures is y' = y * cos($\theta$) and the right is with added "-z * sin($\theta$)"?
Been looking everywhere for an explanation to this, preferably visual, but everywhere I look they just state it as a given and no further explanation is given. Very thankful for help!
Actually think I found the answer to my question here now so I'll post it here in case it will help someone else. As I understand it now:
y' = y * cos()
Is actually
y' = y * cos( + ϕ)
if you want to rotate something that already have an rotation. As described in a way that I could grasp here: http://jccc-mpg.wikidot.com/rotation-matrices
So y' = y * cos() is working but only if you start on the axis or I guess know the rotations made earlier. But to add further rotation on an already rotated object you can rewrite it so you only need one added angle of rotation variable and that turns out to:
y' = y * cos() - z * sin()
How that rewrite is done I found a very helpful video here: https://www.youtube.com/watch?v=PfLICFwAZys
I've only focused on the y' here to make it shorter but same applies for all three axis. Am I gettings this right or something that I'm missing? Thanks