An advanced computer algorithm for determining morphology development in latex particles