Description This subroutine sets the construction parameters and phase departure coefficients for a surface with the "Two point exposure holographic optical element" Grating attribute.
Syntax SetDiffractHOE( n, tGrating, phaseType, coefs )
Parameters n As Long Node number of the diffraction grating surface.
tGrating As T_HOE Data structure defining the two-point construction of the grating phase profile.
phaseType As String Aspheric phase deformation type for the HOE grating. Can be "None", "Radial polynomial", or "XY polynomial".
coefs() As Double Aspheric phase deformation coefficients for the HOE grating.
For the x,y polynomial phase departure type: •The XY polynomial has the form: p(x,y) = SUM[i=0..n] SUM[j=0..i] (Aij * x^(i-j) * y^j) •The above form gives the first few terms as: A00, A10, A11, A20, A21, A22, ... •The index of coefficient Aij in the coefficients array is j + (i*(i+1))/2 •Example: the coefficient for the X0Y2 term is A22, which will be at index 5 in the coefs() array •Number of terms exactly at order i: (i+1) •Number of terms up to, and including, order n: (n+1)(n+2)/2
For the radial phase departure type, the index of the coefficient array corresponds to the n'th order polynomial. For example, the coefficient of the r2 polynomial term is stored at index 2 in the coefs() array.
Example #1 - HOE Grating with XY Polynomial Phase The following example demonstrates how to configure a 2-point HOE type grating using two plane waves and the X0Y2 term of the XY Phase polynomial to represent the parabolic approximation of a focusing beam in the Y-Z plane of the grating.
Sub Main
'Grating surface Dim grat As Long grat = FindFullName( "Geometry.HOE Grating.Surface" )
'Two plane waves in the same direction. Grating phase profile will 'be controlled entirely by the phase polynomial terms Dim tHOE As T_HOE tHOE.exposureRefIndex = 1.0 tHOE.exposureWavelength = 0.55 tHOE.isSrc1Position = False 'Plane wave tHOE.isSrc1Real = True tHOE.isSrc2Position = False 'Plane wave tHOE.isSrc2Real = True tHOE.x1 = 0 tHOE.y1 = 0 tHOE.z1 = 1 tHOE.x2 = 0 tHOE.y2 = 0 tHOE.z2 = 1
'Grating phase polynomial terms Dim coefs() As Double, focal As Double focal = 25 '25 mm focus distance ReDim coefs(5) 'values automatically initialized to 0 coefs(5) = 1/(2*focal)
'Set the holographic grating SetDiffractHOE( grat, tHOE, "XY polynomial", coefs() )
'Simple efficiency table with 100% efficiency in the -1 order Dim efficiencies() As Double ReDim efficiencies( 1, 1 ) 'Diffraction orders efficiencies( 1, 0 ) = -1 'Wavelengths in microns efficiencies( 0, 1 ) = 0.55 'Efficiency values efficiencies( 1, 1 ) = 1.0
'Set the diffraction efficiency type SetDiffractEfficiencyTable( grat, efficiencies )
'Update Update
End Sub
Example #2 - HOE Grating with Radial Polynomial Phase The following example demonstrates how to configure a 2-point HOE type grating using two plane waves and the R2 term of the Radial Phase polynomial to represent the parabolic approximation of a focusing beam.
Sub Main
'Grating surface Dim grat As Long grat = FindFullName( "Geometry.HOE Grating.Surface" )
'Two plane waves in the same direction. Grating phase profile will 'be controlled entirely by the phase polynomial terms Dim tHOE As T_HOE tHOE.exposureRefIndex = 1.0 tHOE.exposureWavelength = 0.55 tHOE.isSrc1Position = False 'Plane wave tHOE.isSrc1Real = True tHOE.isSrc2Position = False 'Plane wave tHOE.isSrc2Real = True tHOE.x1 = 0 tHOE.y1 = 0 tHOE.z1 = 1 tHOE.x2 = 0 tHOE.y2 = 0 tHOE.z2 = 1
'Grating phase polynomial terms Dim coefs() As Double, focal As Double focal = 25 '25 mm focus distance ReDim coefs(2) 'values automatically initialized to 0 coefs(2) = 1/(2*focal)
'Set the holographic grating SetDiffractHOE( grat, tHOE, "Radial polynomial", coefs() )
'Simple efficiency table with 100% efficiency in the -1 order Dim efficiencies() As Double ReDim efficiencies( 1, 1 ) 'Diffraction orders efficiencies( 1, 0 ) = -1 'Wavelengths in microns efficiencies( 0, 1 ) = 0.55 'Efficiency values efficiencies( 1, 1 ) = 1.0
'Set the diffraction efficiency type SetDiffractEfficiencyTable( grat, efficiencies )
'Update Update
End Sub
See Also Diffraction Grating Script Commands
|