IRayTraceNormPolData

IRayTraceNormPolData performs a batch polarized ray trace, using normalized pupil coordinates.

When opening the tool, the user selects the number of maximum rays to be traced, the type of rays (the ray tracing can use real or paraxial rays), the Jones vector (electric field) and the surface up to which the rays will be traced.

CreateNormPol (int MaxRays, RaysType rayType, double Jx, double Jy, double phaX, double phaY, int toSurface)

The rays are then defined one by one in the AddRay function. The rays are defined by the wavelength, the relative field and pupil coordinates, and a Jones vector. Jx and Jy represent the amplitude of the electric field in the x and y directions respectively, and Phax and Phay represents the relative phase in degrees of the complex electric field. The quantity Jx*Jx + Jy*Jy should have a value of 1.0 (with an important exception described below) although any values are accepted. Note that the generated electric field will depend on the method selected in the System Explorer to perform the conversion from J to E.

AddRay (int waveNumber, double Hx, double Hy, double Px, double Py, double exr, double exi, double eyr, double eyi, double ezr, double ezi)
  • If all six of the electric field values are zero; then OpticStudio will use the Jx and Jy values provided in the CreateNormPol function to determine the electric field.
  • If Jx, Jy, Phax, and Phay are all zero, and only in this case, then OpticStudio assumes an "unpolarized" ray trace is required. An unpolarized ray trace requires OpticStudio to trace two orthogonal rays and the resulting transmitted intensity be averaged. If any of the four values are not zero, then a single polarized ray will be traced.
  • If all six of the electric field values are non-zero; the electric field is defined by these six values. The defined electric field vector must be orthogonal to the ray vector or incorrect ray tracing will result.

Results

There are two methods to return the results:

ReadNextResult (out int rayNumber, out int ErrorCode, out double exr, out double exi, out double eyr, out double eyi, out double ezr, out double ezi, out double intensity)
 
ReadNextResultFull (out int rayNumber, out int ErrorCode, out double xo, out double yo, out double zo, out double lo, out double mo, out double no, out double exr, out double exi, out double eyr, out double eyi, out double ezr, out double ezi, out double intensity)
  • rayNumber
  • ErrorCode
  • exr, exi, eyr, eyi, ezr, ezi: the ex, ey, and ez values are the electric field components, with the r and i characters denoting the real and imaginary portions
  • intensity: the power of the ray
  • if ReadNextResultFull is used: xo, yo, zo: the coordinates of the ray at the requested surface
  • if ReadNextResultFull is used: lo, mo, no: direction cosines of the ray at the requested surface

Next: