Description This subroutine retrieves the wavelength, N1 and N2 values of the i'th sample in the table of a power-law GRIN material.
Syntax GetIthPowerLawGrinMaterial( matNode, ithSamp, wavl, n1, n2 )
Parameters matNode As Long Node number of the power-law grin material node being queried.
ithSamp As Long Column-index (0-based) of the sample in the table that is being retrieved. Samples are ordered by increasing wavelength so that the 0'th sample corresponds to the shortest wavelength.
wavl As Double After the subroutine is executed, this parameter contains the wavelength value (microns) of the i'th sample.
n1 As Double After the subroutine is executed, this parameter contains the on-axis refractive index value of the i'th sample.
n2 As Double After the subroutine is executed, this parameter contains the cladding refractive index value of the i'th sample.
Example The example below demonstrates how to retrieve the 0'th sample of an existing power-law GRIN material.
Sub Main
Dim matNode As Long matNode = FindMaterial( "Custom Power Law GRIN" )
Dim nSamp As Long Dim wavl As Double, n1 As Double, n2 As Double nSamp = 0 GetIthPowerLawGRINMaterial( matNode, nSamp, wavl, n1, n2 )
Print "Material: " & Chr(9) & GetMaterialName( matNode ) Print "Sample: " & Chr(9) & nSamp Print "Wavelength (um): " & Chr(9) & wavl Print "N1: " & Chr(9) & n1 Print "N2: " & Chr(9) & n2
End Sub
See Also
|