Using Graphics Algorithms as Subroutines in Collision Detection