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?
trick is to find the normal vectors of the triangles using cross product b4 and after rotations
v1 = (F.x - G.x, F.y - G.y, F.z - G.z)
v2 = (F.x - H.x, F.y - H.y, F.z - H.z)
n = cross_prod(v1, v2) # see http://en.wikipedia.org/wiki/Cross_product
n = n / norm(n) # normalize to unit vector
v'1 = (F'.x - G'.x, F'.y - G'.y, F'.z - G'.z)
v'2 = (F'.x - H'.x, F'.y - H'.y, F'.z - H'.z)
n' = cross_prod(v'1, v'2)
n' = n' / norm(n')
rot = arc_cos(n.x * n'.x + n.y * n'.y + n.z * n'.z)
来源:https://stackoverflow.com/questions/18983977/find-the-rotation-angles-of-a-triangle-in-3d-given-the-coordinates-of-its-verti