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)
(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}$)
I hope this is more understandable :/ This is really hard to explain, since english is not my native language :(