Previous Up Next

26.15.8  Checking whether an object in the plane is a square

See Section 27.11.12 for checking for squares in 3D geometry.

The is_square command determines whether or not a geometric object is a square.

Examples

is_square(1+i,-1+i,-1-i,1-i)
     
1           
K:=square(1+i,-1+i); is_square(K)
     
1           
K:=square(1+i,-1+i,C,D); is_square(K[0])
     
1           

Note that K[0] is a square since K is a list made of a square and vertices C and D.

affix(C,D)
     
−1−i,1−i           
is_square(i,-1+i,-1-i,1-i)
     
0           

Previous Up Next