### 12.14.8 Orthogonal projection in space: projection

See section 11.15.8 for projections in the plane.

The projection command takes one or two arguments. The
first argument is a geometric object. The second optional
argument is a point. The command will project the point onto the
object.

With one argument, projection returns a new command which
projects a point.

Input:

p1 := projection(line(point(0,0,0), point(1,1,1)))

then:

p1(point(1,0,0))

returns and draws the point (1/3,1/3,1/3), which is the projection
of (1,0,0) onto the line.

Input:

p2 := projection(plane(point(1,0,0),point(0,0,0),point(1,1,1))

then:

p2(point(0,0,1))

returns and draws the point (0,1/2,1/2), which is the projection of
the point (0,0,1) onto the plane.

With a second argument of a point, inversion
returns and draws the projection of the point.

Input:

projection(line(point(0,0,0), point(1,1,1)), point(1,0,0))

returns and draws the point (1/3,1/3,1/3), as above.