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

### 14.13.5 Checking if two lines or two spheres in space are orthogonal: is_orthogonal

See Section 13.16.13 for checking for orthogonality in two-dimensional geometry.

The is_orthogonal command determines whether or not two objects are orthogonal.

- is_orthogonal takes two arguments:
  L,P, which can be two lines, two spheres, two planes or a line and a plane.
- is_orthogonal(L,P) returns 1 is the objects are orthogonal; it returns 0 otherwise.

#### Examples.

- 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