Align an object with the same-shaped points in 3D space

58 Views Asked by At

I have an object (a hexagon, an irregular one, so angles between the sides may vary), it is aligned straignt on the (0, 0, 0) coordinates, i know its coordinates and its points coordinates.

And I have 6 points in space, that if connected, represent exactly the same shape as my hexagon. I have their coordinates.

Now how do I apply a new position and rotation to my hexagon in a way that it aligns perfectly to these points? I know, that I proably can just translate each point of that hexagon to the new points, but that is not what I am trying to do.