### 26.16.3 Harmonic division

Four collinear points A, B, C and D are in harmonic division if |CA|/|CB|=|DA|/|DB| . In this case, D is called the harmonic conjugate of A, B and C.

Four concurrent lines or four parallel lines are in harmonic division if the intersection of any fifth line with these four lines consists of four points in harmonic division. The lines are also said to form a harmonic pencil. The fourth line is called the harmonic conjugate of the first three.

The harmonic_division command finds harmonic conjugates.

- harmonic_division takes four arguments:
  - P1,P2,P3, three collinear points or three concurrent lines.
  - var, a variable name.
- harmonic_division(P1,P2,P3,var) returns and draws the three points or lines P1,P2 and P3 together with their harmonic conjugate, and assigns the latter to var.

#### Examples

A,B,C:=point(i),point(2+i),point(3/2+i); harmonic_division(A,B,C,D)

affix(D)

3+i |  |  |  |  |  |  |  |  |  |