Added angle and triangle type detection