A Digital Twin Simulator of a Pastillation Process with Applications to Automatic Control based on Computer Vision