Refraction and rotation of a transparent cube