### 11.15.7 Inversion in the plane: inversion

See section 12.14.7 for inversions in space.

Given a circle C with center O and radius r, the *inversion*
of a point A with respect to C is the
point A′ on the ray OA satisfying
OA·OA′ = r^{2}.

The inversion command takes two or three arguments.

If inversion has two arguments, they are a point (the center
of inversion) and a real number (the radius).
inversion returns a new command which performs the
inversion.

Input:

inver := inversion(i, 2)

then:

inver(circle(1+i,1))

Output:

then:

inver(circle(1+i,1/2))

Output:

If inversion has three arguments, the first two arguments are a
point and number as above, and the third argument is a geometric
object. inversion returns and draws the inverted object.

Input:

inversion(i, 2, circle(1+i,1))

Output:

Input:

inversion(i, 2, circle(1+i,1/2))

Output: