Check if two lines or two spheres in space are orthogonal: is_orthogonal

### 13.13.5 Check if two lines or two spheres in space are orthogonal: is_orthogonal

See section 12.16.13 for checking for orthogonality in two-dimensional geometry.

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

is_orthogonal returns 1 is the objects are orthogonal; it returns 0 otherwise.

Input:

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

Output:

1

Input:

is_orthogonal(line([2,3,-2],[-1,-1,-1]),
plane([-1,-1,-1],[-1,0,3],[-2,0,0]))

Output:

1

Input:

is_orthogonal(plane([0,0,0],[1,2,-3],[1,1,-2]),
plane([-1,-1,-1],[1,2,-3],[0,0,0]))

Output:

1

Input:

is_orthogonal(sphere([0,0,0],sqrt(2)),sphere([2,0,0],sqrt(2)))

Output:

1