IRayTraceDirectPolData
RayTraceDirectPolData performs a batch polarized ray trace, using direct x/y/z 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 to define the electric field and the first and last surfaces where the rays will be traced. If Jx, Jy, Phax, and Phay are all zero, and only in this case, then OpticStudio assumes an "unpolarized" ray trace is required.
CreateDirectPol (int MaxRays, RaysType rayType, double Jx, double Jy, double phax, double phay, int startSurface, int toSurface)
The rays are then defined one by one in the AddRay function. The rays are defined by the wavelength and x, y, z, l, m, and n coordinates on any starting surface.
AddRay (int waveNumber, double X, double Y, double Z, double L, double M, double N)
Results
There are two methods to return the results:
ReadNextResult (out int rayNumber, out int ErrorCode, out int vignetteCode, 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 int vignetteCode, 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: