26.15.9 Checking whether an object in the plane is a rhombus
See Section 27.11.13 for checking for rhombuses in
3D geometry.
The is_rhombus
command determines whether or not a geometric object is a rhombus.
-
is_rhombus takes
G, a geometric object or a sequence of four points assumed to be
the vertices of a quadrilateral.
- is_square(G) returns 1 if G
is a rhombus but not a square, returns 2 if G is a square and
returns 0 otherwise.
Examples
is_rhombus(1+i,-1+i,-1-i,1-i) |
K:=rhombus(1+i,-1+i,pi/4); is_rhombus(K) |
K:=rhombus(1+i,-1+i,pi/4,C,D); is_rhombus(K[0]) |
Note that K[0] is a rhombus since K is a list made
of a rhombus and vertices C and D.
is_rhombus(i,-1+i,-1-i,1-i) |