what defines a triangle