Three operations are necessary to scatter a photon and track its polarization; these operations are graphically described in the movie below.
Download Polarized Light Program
The E field is originally defined respect to a meridian plane COA. The field (visible in the movie as blue lines) can be decomposed into its parallel and perpendicular components E|| and E _I_. Once the scattering angle a and azimuth angle f have been generated (section 6) the Stokes vector is manipulated three times. First the Stokes vector is rotated so that its reference plane is ABO; this is the scattering plane. This rotation is necessary because the scattering matrix, that defines the elastic interaction of a photon with a sphere, is specified with respect to the frame of reference of the scattering plane. Second, the Stokes vector is multiplied by the scattering matrix that accounts for scattering of the photon at an angle a. Third, the Stokes vector is rotated so that it is referenced to the new meridian plane COB.