A method of obtaining a regular periodic structure and a device for producing thereof