13.16.6 Checking if an object in the plane is an isosceles triangle: is_isosceles
See Section 14.13.10 for checking for isosceles
triangles in three-dimensional geometry.
The is_isosceles command determines whether or not a
geometric object is an isoceles triangle.
-
is_isosceles takes one argument:
G, a geometric object or a sequence of three points assumed to be
the vertices of a triangle.
- is_isosceles(G) returns 1,2 or 3 if the object
is an isoceles triangle (the number indicates which vertex is on two
equal sides), returns 4 if the object is an equilateral triangle,
and returns 0 otherwise.
Examples.
-
Input:
is_isosceles(0, 1+i,i)
Output:
- Input:
T:= isosceles_triangle(0,1,pi/4) |
is_isosceles(T)
|
Output:
- Input:
T:= isosceles_triangle(0,1,pi/4,C) |
is_isosceles(T[0])
|
Output:
Note that T[0] is a triangle since T is a list made
of a triangle and the vertex C.
Input:
affix(C)
Output:
- Input:
is_isosceles(1+i, -1+i, -i)
Output:
- Input:
is_isosceles(0,2,1+i*sqrt(3))
Output: