Diffraction Coefficients: Converting from Code V to Zemax and Back

You can control light by refraction, reflection and diffraction. The former are easily understood: a mirror and a lens. The later is conceptually a little more difficult. Using the wave nature of light a diffractive is like a fresnel lens except the step height is a function of the wavelength / divided by the index of refraction....:

The best reference for a crash course in diffractives is "Diamond-Turned Diffractive optical elements for the Infrared spectrum" by Max J. Riedl, SPIE 2540 Sept 1995


Subtleties in specifying these surfaces in ray trace codes:

Code V and Zemax can both model a diffractive surface. Unfortunately they do not use the same nomenclature in the phase function and therefore once needs to convert back and forth.

Code V (Reidl) diffractive phase: 

φ_CV = 2π/λ*(C2*ρ^2+C4*ρ^4+C6*ρ^6....) 

where ρ is the semi aperture and has a value of 0 to 1.0 

φ_CV = 2π/λ*Σ(C2i*ρ^2i) summed from i = 1....some value, or 2i is the pupil power 

Zemax diffractive phase: 

φ_Z = A1*σ^2+A2*σ^4+A3*σ^6.... Binary2 surface type 

where σ is real semi aperture and has a value of 0 to "Norm Radius" 

φ_Z = Σ(Aj*ρ^2j) summed from j = 1 to N or j is the pupil power 

A terms and 'Norm Radius' entered in extra data editor (F8) 

So to convert from one to another:

Zemax to Code V 

C2i = Aj*λ/2/π/σ^2j.... I guess in this case the 'i's and 'j's are synchronized 

said another way 

C2 = A1*λ/2/π/σ^2 

C4 = A2*λ/2/π/σ^4......

Example: if your "Norm radius" is 2.6, A2 is 4 and λ is 0.0005 mm (or 500 nm) then 

C4 = 4*0.0005/2/π/2.6^4 = 7e-6 

Code V will model the as a "DIF HOE" modifier. Ensure to also enter 

HWL 500;HCT R;HOR 1;HZ1 0.0;HZ2 0.0 

Assumes you like command mode:)  and not the GUI like me who is 'old skool' and gets lost in the fancy graphics thingy

Code V to Zemax 

Aj = C2i*2*π*σ^2j/λ (i=j) 

Or some examples for specific terms:

A1 = C2*2*π*σ^2/λ 

A2 = C4*2*π*σ^4/λ 

Another example: 

If C4 is 7e-6, and λ is 0.0005 mm (or 500 nm) then 

A2 = 7e-6*2*π*1^4/0.0005 = 0.087 

but...if you decide to have a norm radius in Zemax of 2.6... 

A2 = 7e-6*2*π*2.6^4/0.0005 = 4 

I know this is clear as mud

I believe Zemax uses the normalized radius to properly model phase function changes due to temperature cycling, while Code V modifies the Ci terms with temperture