**inversive geometry**is the geometry of circles and the set of transformations that map all circles into circles. This is an angle-preserving (or "conformal") geometry. For greater than two dimensions, this is also the same as conformal geometry. For two dimensions, however, conformal geometry is simply the Riemann sphere.

In the spirit of the Erlangen program, inversive geometry is the study of transformations generated by the Euclidean transformations together with inversions, which in coordinate form, basically are conjugate to

*r*is the radius of the inversion. Note that in inversive geometry, there is no distinction made between a straight line and a circle (or hyperplane and hypersphere): a line is just nothing more and nothing less than a circle in its particular embedding in a Euclidean geometry (with a point added at infinity) and one can always be transformed into another.

## Computer program

The following QBasic program can be used to interactively explore the nature of inversive transformations:'PROGRAM INVGEOM.BAS pi = 4 * ATN(1) SCREEN 13 WINDOW (0, 0)-(300, 3 / 4 * 300) 'diatessaron newx = 143 newy = 98 newrad = 14 cx = 150 cy = 100 R = 30 main: CLS 'given circle FOR thet = 0 TO 2 * pi STEP .01 PSET (newx + newrad * COS(thet), newy - newrad * SIN(thet)) NEXT COLOR 2 'identity circle which defines inversive transformation FOR thet = 0 TO 2 * pi STEP .01 PSET (cx + R * COS(thet), cy - R * SIN(thet)) NEXT COLOR 15 'transformed version of given circle FOR thet = 0 TO 2 * pi STEP .01 x = newx + newrad * COS(thet) y = newy - newrad * SIN(thet) xdif = x - cx ydif = y - cy rho = SQR(xdif ^ 2 + ydif ^ 2) rhop = R ^ 2 / rho xdifp = xdif / rho * rhop 'xdifp = xdif / rho^2 * R^2 ydifp = ydif / rho * rhop xp = cx + xdifp yp = cy + ydifp PSET (xp, yp) NEXT waiting: k$ = INKEY$ IF k$ = "" THEN GOTO waiting 'move given circle one step to the left IF LCASE$(k$) = "q" THEN newx = newx - 1 'move given circle one step to the right IF LCASE$(k$) = "w" THEN newx = newx + 1 'move given circle one step up IF LCASE$(k$) = "a" THEN newy = newy - 1 'move given circle one step down IF LCASE$(k$) = "s" THEN newy = newy + 1 'decrease radius of given circle by one unit IF LCASE$(k$) = "z" THEN newrad = newrad - 1 'increase radius of given circle by one unit IF LCASE$(k$) = "x" THEN newrad = newrad + 1 'move identity circle one step to the left IF LCASE$(k$) = "e" THEN cx = cx - 1 'move identity circle one step to the right IF LCASE$(k$) = "r" THEN cx = cx + 1 'move identity circle one step up IF LCASE$(k$) = "d" THEN cy = cy - 1 'move identity circle one step down IF LCASE$(k$) = "f" THEN cy = cy + 1 'decrease the radius of the identity circle by one unit IF LCASE$(k$) = "c" THEN R = R - 1 'increase the radius of the identity circle by one unit IF LCASE$(k$) = "v" THEN R = R + 1 GOTO main

The inversive transformation is defined by an "identity circle" which is shown in green. A pair of white circles represent the "given circle" and the "transformed version of the given circle". While the program is running, the given circle can be moved with the keys: Q (left), W (right), A (up), D (down), Z (decrease radius), X (increase radius). The identity circle can be moved with the keys: E (left), R (right), D (up), F (down), C (decrease radius), V (increase radius).