Description This subroutine appends a wavelength sample to the N1,N2 table of a power-law GRIN material definition.
Syntax AppendPowerLawGrinMaterial( wavl, n1, n2 )
Parameters wavl As Double This parameter defines the wavelength (in microns) to which n1 and n2 correspond.
n1 As Double This parameter is the on-axis refractive index value.
n2 As Double This parameter is the cladding refractive index value.
Example The example below demonstrates how to add a new power law GRIN material, update its name and then add additional wavelength samples for the on-axis and cladding refractive index values.
Sub Main
Dim wavl As Double, n1 As Double, n2 As Double Dim alpha As Double, g As Double Dim matNode As Long
'Initial parameters wavl = 0.62 'microns n1 = 1.4893 n2 = 1.3 alpha = 1.0 g = 2.0 matNode = AddPowerLawGRINMaterial( wavl, n1, n2, alpha, g ) SetMaterialName( matNode, "Custom Power Law GRIN" ) Update
Print "Power-law GRIN added at node " & matNode
'Now add additional wavelength samples AppendPowerLawGRINMaterial( matNode, 0.63, 1.4889, 1.2996 ) AppendPowerLawGRINMaterial( matNode, 0.64, 1.4886, 1.2993 ) AppendPowerLawGRINMaterial( matNode, 0.65, 1.4883, 1.2990 ) Update
End Sub
See Also
|