Previous Up Next

11.16.9  Check if an object in the plane is a rhombus: is_rhombus

See section 12.13.13 for checking for rhombuses in three-dimensional geometry.

The is_rhombus command takes as argument a geometric object or four points.

is_rhombus returns 1 or 2 if the object is a rhombus; it returns 1 if the object is a rhombus but not a square and 2 if the object is a square. The command returns 0 if the object is not a rhombus.
Input:

is_rhombus(1+i, -1+i, -1-i, 1-i)

Output:

1

Input:

K := rhombus(1+i, -1+i, pi/4)

then:

is_rhombus(K)

Input:

1

Input:

K := rhombus(1+i, -1+i, pi/4, C, D)

then:

is_rhombus(K[0])

Input:

1

Note that K[0] is a rhombus since K is a list made of a rhombus and vertices C and D. Entering affix(C,D) returns -sqrt(2)-i,-sqrt(2)+i.
Input:

is_rhombus(i, -1+i, -1-i, 1-i)

Output:

0

Previous Up Next