Check if an object in the plane is an isosceles triangle: is_isosceles

### 12.16.6 Check if an object in the plane is an isosceles triangle: is_isosceles

See section 13.13.10 for checking for isosceles triangles in three-dimensional geometry.

The is_isosceles command takes as argument a geometric object or three points.

is_isosceles returns 1, 2, 3 or 4 if the object (or triangle formed by the three points) is an isosceles triangle (the number indicates which vertex is on two equal sides) or a value of 4 means the triangle is equilateral. The command returns 0 if the object is not an isosceles triangle.
Input:

is_isosceles(0, 1+i,i)

Output:

2

Input:

T := isosceles_triangle(0,1,pi/4)

then:

is_isosceles(T)

Output:

1

Input:

T := isosceles_triangle(0,1,pi/4,C)

then:

is_isosceles(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 sqrt(2)/2 + i*sqrt(2)/2
Input:

is_isosceles(1+i, -1+i, -i)

Output:

3

Input:

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

Output:

4