### 26.14.8 Orthogonal projection in the plane

See Section 27.12.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

L:=line(-1,i,color=grey); p1:=projection(L); Q:=point(i+1); P:=p1(Q)

or:

L:=line(-1,i,color=grey); Q:=point(i+1); P:=projection(L,Q)

C:=circle(-1,1,color=grey); p2:=projection(C); Q:=point(i); P:=p2(i)

or:

C:=circle(-1,1,color=grey); Q:=point(i); P:=projection(C,i)