Collision detection in shape