### 12.13.4 Check if lines and/or planes in space are perpendicular: is_perpendicular

See section 11.16.12 for checking for perpendicularity in two-dimensional geometry.

The is_perpendicular command takes as arguments two lines, two planes or a line and a plane.

is_perpendicular returns 1 is the objects are perpendicular; it returns 0 otherwise. (Note that two lines must be coplanar to be perpendicular.)

Input:

is_perpendicular(line([2,3,-2],[-1,-1,-1]),line([1,0,0],[1,2,8]))

Output:

0

Input:

P1 := plane([0,0,0],[1,2,-3],[1,1,-2])
P2 := plane([-1,-1,-1],1,2,-3],[0,0,0])

then:

is_perpendicular(P1,P2)

Output:

1

Input:

L := plane([2,3,-2],[-1,-1,-1])

then:

is_perpendicular(L,P1)

Output:

0