Determination of the three-point correlation function of a passive scalar in the presence of a mean gradient