# Transform a cube in a truncated pyramid

I have to calculate the modeling transformation that transforms a cube of side=1 centered in (0,0,0) in a rectangular truncated pyramid of height=2,sides of basic rectangle equals to 3 and 2, sides of up rectangle 1.5 and 1. Moreover the pyramid has the center of basic rectangle (down rectangle) in (0,0,0), the axis of symmetry lies on y=-x and the major side of the the basic rectangle must be rotated 45 ° towards the direction of -z. I'm not able to realize this transformation.
I thought that to transforme the cube in a trucated pyramid is analogous to transform a square in a isoscele trapeze and thus I can't use an affine transformation because it preserves parallelism and this isn't the case. I need, may be , a projection transformation that I know more o less how works but I'm not able to apply in this case. But I know the transformation that map a 3D figure in a 2-D plane, but in this case I have to associate a 3D figure (cube) to a 3D figure (truncated pyramid) I believe. How can I realise this transformation?