• Forum
  • Lounge
  • Need help with this Math exercise please

 
Need help with this Math exercise please

Oct 9, 2016 at 9:56am
Greetings everyone, I am new to the site. I have this problem I need to program in C++:

Q:Calculate the coordinate of the point (2,3,1) after a rotation through 90deg about the x-axis.

Here is my attempt at it but I am not 100% certain this is correct, hence why I'm posting this thread:

I multiplied the 3x3 Matrix (1 0 0, 0 0 -1, 0 1 0) by the coordinates (2, 3, 1) and I obtained the following resultant matrix: [2, -1, 3]

Is my work correct? If not, please point out my mistake and give me a hint if possible, thank you.
Last edited on Oct 9, 2016 at 9:56am
Oct 9, 2016 at 11:02am
Looks correct.
Now you just need to write a C++ program to this.

Tip: Instead of writing an algorithm to do matrix multiplication, just get the expression for each point.
Oct 9, 2016 at 11:56am
In the future, you should post in the beginners section of this forum.
Oct 9, 2016 at 10:06pm
Thank you fellas.
Oct 10, 2016 at 5:25am
closed account (48T7M4Gy)
Looks to be right.


1 0  0    2      2
0 0 -1    3 =   -1
0 1  0    1      3

See also https://en.wikipedia.org/wiki/Rotation_matrix
Nov 1, 2016 at 1:34pm
trackin bron makin plays
Topic archived. No new replies allowed.