Detect_triangle