A molecular dynamics simulation of the fullerene formation process