If the collision occurs with the right side, the coordinate
system of the ball must be rotated such that the y component
of the ball’s coordinate system corresponds to the normal
vector of the wall as shown on the right side of Fig. 3. This
rotation is necessary to properly apply the collision matrix.
The velocity vector at the right wall is therefore modified by
the rotation matrix