Previous Up Next

11.16.12  Check if two lines in the plane are perpendicular: is_perpendicular

See section 12.13.4 for checking for perpendicularity in three-dimensional geometry.

The is_perpendicular command is a Boolean function which takes as argument two lines.

is_perpendicular returns 1 if the lines are perpendicular and returns 0 otherwise.
Input:

is_perpendicular(line(0,1+i),line(i,1))

Output:

1

Input:

is_parallel(line(0,1+i),line(1+i,1))

Output:

0

Previous Up Next