the invention provides an optical fiber , a method for the preparation thereof , and a device . an optical fiber , wherein a distal end of the optical fiber is provided with an optical mask adapted for projecting a predetermined pattern on a target surface by radiation transmitted from the distal end of the optical fiber , allows for the rapid application of patterns and three - dimensional structures on target surfaces , in particular on the ends of optical fibers .