  We obtain a first order differential equation for the driving function of the
chordal Loewner differential equation in the case where the domain is slit by a
curve which is a trajectory arc of certain quadratic differentials. In
particular this includes the case when the curve is a path on the square,
triangle or hexagonal lattice in the upper halfplane or, indeed, in any domain
with boundary on the lattice. We also demonstrate how we use this to calculate
the driving function numerically. Equivalent results for other variants of the
Loewner differential equation are also obtained: Multiple slits in the chordal
Loewner differential equation and the radial Loewner differential equation. The
method also works for other versions of the Loewner differential equation. The
proof of our formula uses a generalization of Schwarz-Christoffel mapping to
domains bounded by trajectory arcs of rotations of a given quadratic
differential that is of interest in its own right.
