Since with this method many paths are directed toward the edges of the image, we store the already drawn paths in a separate file. We test if a new path overlaps existing ones and if the difference at the overlap position of the canvas and the target image brightness is less than zero, the path will be cut (see Algorithm 3, line 1–16). If the remaining stroke is shorter than the minimum length minLen it will be deleted (see Algorithm 3, line 17).