Orthogonal projection in the plane: projection

### 13.15.8 Orthogonal projection in the plane: projection

See Section 14.14.8 for projections in space.

The projection command creates a projection.

- projection takes one mandatory argument and one optional argument:
  - O, a geometric object.
  - Optionally, G, a geometric object.
- projection(O) returns a new command which projects points onto O.
- projection(O,G) returns and draws the projection of G onto O.

Examples.

- Input:

  p1:= projection(line(-1,i))
  p1(i+1)

  Output:
- Input:

  p2:= projection(circle(-1,1))
  p2(i)

  Output:
- Input:
  projection(line(-1, i), 1+i)
  Output:
- Input:
  projection(circle(-1,1), i)
  Output: