  In a recent series of scanning probe experiments, it became possible to
visualize local electron flow in a two-dimensional electron gas. In this paper,
a Green's function technique is presented that enables efficient calculation of
the quantity measured in such experiments. Efficient means that the
computational effort scales like $M^3 N$ ($M$ is the width of the tight-binding
lattice used, and $N$ is its length), which is a factor $MN$ better than the
standard recursive technique for the same problem. Moreover, within our
numerical framework it is also possible to calculate (with the same
computational effort $M^3 N$) the local density of states, the electron
density, and the current distribution in the sample, which are not accessible
with the standard recursive method. Furthermore, an imaging method is discussed
where the scanning tip can be used to measure the local chemical potential. The
numerical technique is used to study electron flow through a quantum point
contact. All features seen in experiments on this system are reproduced and a
new interference effect is observed resulting from the crossing of coherent
beams of electron flow.
