Design of miniature optical systems could lead to future cell phones that can detect viruses and more.