I'm struggling to understand what would be a good way to compose several geometrical transformations to create a single TransformationFunction
to be applied to a GeometricTransformation
. One way could be to obtain a set of TransformationMatrix
and multiply.
On this answer what I would have liked to achieve is to perform two rotations in different axis and then a translation in order to create a realistic trajectory of a falling cube, knowing height vs time and also the angles of elevation and azimuth vs time.
If I give a list of transformation functions these are applied to different copies of the original object instead of the same in sequence
Graphics3D[{
Opacity[1]
, Red
, Arrow[{{0, 0, 0}, {1, 0, 0}}]
, Green
, Arrow[{{0, 0, 0}, {0, 1, 0}}]
, Blue
, Arrow[{{0, 0, 0}, {0, 0, 1}}]
, Opacity[0.2]
, GeometricTransformation[Cuboid[-{1, 1, 1}/4, {1, 1, 1}/4],
{
RotationTransform[Pi/4, {0, 0, 1}]
, TranslationTransform[{1, 1, 1}]
}
]
}]
How do I properly compose several sequential geometrical transformations ?
Fold
too, but matrix multiplication may be slightly faster: How to render a 3D ellipsoid with Graphics3D? $\endgroup$