Principles of lasers and optics