In confocal and 2P microscopy the path of a laser beam is modified by these devices causing it to scan across the sample in that pattern.

Answer