Previous Up Next

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,

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

Previous Up Next