A geometry-based algorithm for cloning real grains