a 3d composition of the billiards game