Implement dichotomy technique for determining angle from pattern recognition