Simulation of the kinetics of nanoparticle formation in microemulsions.