2
$\begingroup$

I have a problem which might be easy, but I'm losing myself ...

What I must do is create a square in the 3D space, using a normal Vector. This vector is given to me with its 3 angles ($\alpha$,$\beta$,$\gamma$) where $\alpha$ is the angle he makes with X axis (1,0,0), $\beta$ the angle with Y axis (0,1,0), and $\gamma$ for the Z axis.

Let's say for the example that the square have a size of 2.

What I thought is that if I create a rectangle defined by 4 points A(1,1,0), B(-1,1,0), C(-1,-1,0) and D(1,-1,0) (so it's normale is $\vec{N}$(0,0,1)), then multiply each of his points by the 44Matrix (created by multiplying the 3 rotation matrixes (MX = R($\alpha$), MY = R($\beta$) and MZ = R($\gamma$) ), beggining with the MZ one), then the square obtained will be the one i'm looking for.

Is it True? I have some problems visualizing 3D in my head. :/

Thanks for all!

Have a nice day

To give an example with values : If the 3 angles are ($\frac{\pi}{4}$, $\frac{\pi}{4}$, $\frac{\pi}{4}$), the normale will be ($\frac{1}{\sqrt{3}}$,$\frac{1}{\sqrt{3}}$,$\frac{1}{\sqrt{3}}$), and the 4 points will be : A(0,-$\frac{\sqrt{2}}{2}$, $\frac{\sqrt{2}}{2}$), B(1,0,0),C(0,$\frac{\sqrt{2}}{2}$,-$\frac{\sqrt{2}}{2}$) and D(-1,0,0) enter image description here (On this image, points are named B,C,D,E instead of A,B,C,D, sorry :/)

You can see that the square as been rotate around all axes to create a unique square.

There is 1 angle that define the rotation of the square on itself...

If the angles were($\frac{\pi}{4}$, 0, $\frac{\pi}{4}$), the normal would still be (1,1,1), but then the 4 points would be A(-$\frac{2}{3}$,-$\frac{2}{3}$,$\frac{2}{3}$), B($\frac{2}{3}$, -$\frac{2}{3}$, $\frac{2}{3}$), C($\frac{2}{3}$, $\frac{2}{3}$, -$\frac{2}{3}$) and D(-$\frac{2}{3}$, $\frac{2}{3}$, -$\frac{2}{3}$)

enter image description here I hope this is more understandable :/ This is really hard to explain, since english is not my native language :(

  • 0
    what do you mean by "square have a size of 2"?2017-01-13
  • 0
    It's only for the example. Here I try to make a square in which each side have a length of 2 ([AB] = 2, [BC] = 2 and so on...). It's not the most important here ^^2017-01-13
  • 0
    Where is the square supposed to be located? Centered on the origin, for instance? How do you determine its rotation? Even centered on the origin, there is still an infinite number of squares that have the same normal.2017-01-13
  • 0
    I'll edit my post to make an example with values. Maybe it'll be more understandable. The square is not located at the center. But as I know its center, I can do the rotation at the center then translate it.2017-01-13
  • 0
    I believe it's the max I can do to explain here :/2017-01-13
  • 1
    Unfortunately, the order in which you multiply the three rotation matrices (one for each [Euler angle](https://en.wikipedia.org/wiki/Euler_angles)) affects the result, because matrix multiplication is [not commutative](https://en.wikipedia.org/wiki/Matrix_multiplication#All_matrices). Simply put, the three Euler angles themselves do not define any specific orientation; you also need to know in which order they are applied. (And yes, this also means that there are a number of different sets of Euler angles, and their users very rarely bother to specify which one they actually use...)2017-01-14
  • 0
    Yeah, that's what I thought too, and i'm pretty sure the one that give me those informations is not aware about the order himself... Thanks for all! :)2017-01-16

0 Answers 0