A 3D simulation of a game of billiards using a haptic device