24.15.5 Checking whether an object is an equilateral triangle in the plane
See Section 25.11.9 for checking for equilateral
triangles in three-dimensional geometry.
The is_equilateral
command determines whether or not a geometric object is an equilateral triangle.
-
is_equilateral takes
G, a geometric object or a sequence of three points assumed to be
the vertices of a triangle.
- is_equilateral(G) returns 1 if the object
is an equilateral triangle and returns 0 otherwise.
Examples
is_equilateral(0,2,1+i*sqrt(3)) |
T:=equilateral_triangle(0,2,C);
is_equilateral(T[0]) |
Note that T[0] is a triangle since T is a list made
of a triangle and the vertex C.
is_equilateral(1+i,-1+i,-1-i) |