Physical mechanisms in carbon formation in flames