This new edition is intended for a one semester course in optics for juniors and seniors in science and engineering. It uses scripts from Maple, MathCad, Mathematica, and MATLAB to provide a simulated laboratory where students can learn by exploration and discovery. The text covers all the standard topics of a traditional optics course. It contains step by step derivations of all basic formulas in geometrical, wave and Fourier optics. The basic text is supplemented by over 170 files, each suggesting programs to solve a particular problem, and each linked to a topic in or application of optics. The computer files are dynamic, allowing the reader to see instantly the effects of changing parameters in the equations. The book is written for the study of particular projects but can easily be adapted to other situations. The three fold arrangement of text, applications and files makes the book suitable for self-learning.