### 11.16.5 Check if an object is an equilateral triangle in the plane: is_equilateral

See section 12.13.9 for checking for equilateral
triangles in three-dimensional geometry.

The is_equilateral command is a Boolean function which takes
as argument a geometric object or three points.

is_equilateral returns 1 if the object (or the
triangle formed by the three points) is an equilateral triangle and
returns 0 otherwise.

Input:

is_equilateral(0,2,1+i*sqrt(3))

Output:

1

Input:

T := equilateral_triangle(0,2,C)

then:

is_equilateral(T[0])

Output:

1

Note that T[0] is a triangle since T is a list made
of a triangle and the vertex C. Entering affix(C)
returns 1 + i*sqrt(3)

Input:

is_equilateral(1+i, -1+i, -1-i)

Output:

0