Finding an intersection point of two objects in space: single_inter line_inter

### 14.4.3 Finding an intersection point of two objects in space: single_inter line_inter

See Section 13.6.6 for single points of intersection of objects in the plane.

The single_inter command finds an intersection point of two geometric objects.
line_inter is a synonym for single_inter

- single_inter takes two mandatory arguments and one optional argument.
  - obj1, obj2, two geometric objects.
  - Optionally, pt, a point or list of points.
  line_inter(obj1,obj2 ⟨pt⟩) returns one of the points of intersection of obj1 and obj2.
  If pt is a single point, then the command returns the point of intersection closest to pt.
  If pt is a list of points, then the command tries to return a point not in pt.

Examples.

- Input:

  A:=single_inter(plane(point(0,1,1),point(1,0,1),point(1,1,0))
  ,line(point(0,0,0),point(1,1,1))):;
  coordinates(A)

  Output:

  ⎡ ⎢ ⎢ ⎣ |
  2
  3
  | , |
  2
  3
  | , |
  2
  3
  | ⎤ ⎥ ⎥ ⎦

- Input:

  B:= single_inter(sphere(point(0,0,0),1),
  line(point(0,0,0),point(1,1,1))):;
  coordinates(B)

  Output:

  ⎡ ⎢ ⎢ ⎣ |
  √ |
  3
  3
  | , |
  √ |
  3
  3
  | , |
  √ |
  3
  3
  | ⎤ ⎥ ⎥ ⎦

- Input:

  B1:=single_inter(sphere(point(0,0,0),1),line(point(0,0,0),point(1,1,1)),
  point(-1,0,0)):;
  coordinates(B1)

  Output:

  ⎡ ⎢ ⎢ ⎣ | − |
  √ |
  3
  3
  | ,− |
  √ |
  3
  3
  | ,− |
  √ |
  3
  3
  | ⎤ ⎥ ⎥ ⎦

- Input:

  C:= single_inter(sphere(point(0,0,0),1),line(point(1,0,0),point(1,1,1))):;
  coordinates(C)

  Output:

  ⎡ ⎣ | 1,0,0 | ⎤ ⎦

- Input:

  C1:=single_inter(sphere(point(0,0,0),1),line(point(1,0,0),point(1,1,1)),
  [point(1,0,0)]):;
  coordinates(C1)

  Output:

  ⎡ ⎢ ⎢ ⎣ |
  1
  3
  | , |
  2
  3
  | , |
  2
  3
  | ⎤ ⎥ ⎥ ⎦