Previous Up Next

26.15.10  Checking whether an object in the plane is a parallelogram

See Section 27.11.14 for checking for parallelograms in 3D geometry.

The is_parallelogram command determines whether or not an object is a parallelogram.

Examples

is_parallelogram(i,-1+i,-1-i,1-i)
     
0           
is_parallelogram(1+i,-1+i,-1-i,1-i)
     
1           
Q:=quadrilateral(1+i,-1+i,-1-i,1-i); is_parallelogram(Q)
     
4           
P:=parallelogram(-1-i,1-i,i,D); is_parallelogram(P[0])
     
1           

Note that P[0] is a parallelogram since P is a list made of a parallelogram and vertex D.

affix(D)
     
−2+i           

Previous Up Next