Libration and precession are different body forces that are ubiquitous in many rapidly rotating systems, particularly in geophysical and astrophysical flows. Libration is a modulation of the background rotation magnitude, whereas precession is a modulation of the background rotation direction. Assessing the consequences of these body forces in large-scale flows is challenging. The Ekman number, the ratio of the rotation time scale to the viscous time scale quantifying the rotation speed, is extremely small, leading to extremely thin and intense shear layers in the flows even when the amplitudes of the body forces are very small. We consider the consequences of libration and precession numerically in a geometrically simple container, a cube, which lends itself to very efficient, accurate, and robust numerical treatment, with the axis of rotation passing through opposite vertices, so that all walls of the cube are at oblique angles to the rotation axis. This results in the geometric focusing of inertial wavebeams reflecting off the walls, whereby the energy density of the wavebeams increases along with the magnitude of their wavevector. The nature of this focusing depends on the forcing frequency but not on the body force. In the inviscid setting, wavebeams form infinitesimally thin vortex sheets, and their energy density becomes unbounded upon focusing. We present linear inviscid ray tracing to set the scene for the focusing of wavebeams and then consider viscous problems at an Ekman number that is typical of current state-of-the-art laboratory experiments. We begin by considering the linear responses, which are comprised of focusing viscous shear layers, of which their details are mostly captured via ray tracing, and particular solutions accounting for the body forces. These have complicated spatio-temporal structures, which differ for libration and precession. Increasing the forcing amplitude from zero introduces nonlinear interactions, enhances the focusing effects via vortex tilting and stretching when the shear layers reflect at the walls, and also introduces temporal superharmonics and a mean flow. When the magnitude of the mean flow is within a few percent of the magnitude of the instantaneous flow, instabilities breaking the spatio-temporal symmetries set in. These are localized in the oscillatory boundary layers where the reflections are concentrated and introduce broadband dynamics in the boundary layers, with additional inertial wavebeams emitted into the interior. The details again depend on the specifics of the body forces.