tried to introduce rotation matrix for general case of the position of the ground and top polygons in space.
tmp save tried some orthogonal vectors