### 12.13.10 Check if an object in space is an isosceles triangle: is_isosceles

See section 11.16.6 for checking for isosceles triangles in two-dimensional geometry.

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

is_equilateral returns 1, 2, 3 or 4 is the points are the vertices of an isosceles triangle or if the object is an isosceles triangle, and returns 0 otherwise. Specifically,

- It returns 4 if the object is an equilateral triangle or if the points are the vertices of an equilateral triangle.
- It returns 1, 2 or 3, respectively, if the object is an isosceles triangle or if the points are the vertices of an isosceles triangle and the first, second or third point is the vertex with equal sides.

Input:

is_isosceles([2,0,0],[0,0,0],[0,2,0])

Output:

2

Input:

T := triangle_isosceles([0,0,0],[2,2,0],[2,2,2])

then:

is_isosceles(T)

Output:

1

Input:

is_isosceles([1,1,0],[-1,1,0],[-1,0,0])

Output:

0