I try to rotate and translate an equilateral triangle in 3D until his vertices reach some coordinates.
The vertices coordinates F,G,H and F',G',H' are known :
I was able to find the new centroid c'
coordinates like this :
c'.x = ( F'.x + G'.x + H'.x ) / 3
c'.y = ( F'.y + G'.y + H'.y ) / 3
c'.z = ( F'.z + G'.z + H'.z ) / 3
So no problem to translate the triangle. But I can't find a way to calculate the rotations needed to put F'G'H' triangle in the right position...
I have to know by how much the triangle F'G'H' has to be rotated in degrees, around each axis (x,y,z), knowing that the rotations of the initial triangle are 0°.
By rotation for each axis, I'm talking about this:
Any ideas?