Previous Up Next

12.13.13  Check if an object in space is a rhombus: is_rhombus

See section 11.16.9 for checking for rhombuses in two-dimensional geometry.

The is_rhombus command as arguments either four points or a geometric object.

is_rhombus returns 1 if the four points are the vertices of a rhombus or if the geometric object is a rhombus, it returns 0 otherwise.

Input:

is_rhombus([2,0,0],[0,1,0],[-2,0,0],[0,-1,0])

Output:

1

Input:

R := rhombus([0,0,0],[2,0,0],[[0,0,1],pi/4])

then:

is_rhombus(S)

Output:

1

Input:

is_rhombus([2,2,0],[-2,2,0],[-2,-1,0],[2,-1,0])

Output:

0

Previous Up Next