Scientists discover new way to grow materials on-demand using crystals and light