Power crosses are useful diagrams for doing lens power calculations in optics. Drawing the power crosses in LaTeX can be tedious, especially if you need to draw multiple power crosses in the same document. The code below creates a new command, \powercross{front@90}{front@180}{back@90}{back@180}, which will draw the power crosses for you and calculate the final lens power based on the powers of the front and back lens surfaces. All values will be rounded to two decimal places.

Note: you need have \usepackage{fp} in the preamble in order for this code to work.

% usage: \powercross{front@90}{front@180}{back@90}{back@180}
        % crosses

        % arithmetic symbols

        % calculate resulting lens (requires fp)

        % labels

For example, this code:


will produce the following:

Power cross diagram generated in LaTeX