Description Sets the Volume Scatter type to Mie for the specified material.
Syntax SetVolScatMie id
Parameters id As Long Identifier of the material.
Example The following example acts on the default "Standard Glass" material and sets up Mie volume scattering based on a Gaussian particle distribution.
Sub Main Dim matNode As Long, wavelen As Double, ref_index As Double, imag_index As Double, immerse_index As Double Dim dia_func As String, dia_min As Double, dia_max As Double, dia_peak As Double, dia_var As Double, mean_free_path As Double
matNode = FindMaterial( "Standard Glass" )
' Set required values to variables wavelen = 0.632 ref_index = 1.6 imag_index = 0 immerse_index = RefractiveIndex ( matNode, wavelen ) dia_func = "Gaussian" dia_min = 0.5 dia_max = 2 dia_peak = 1.25 dia_var = 1 mean_free_path = 10
' Create density _data as 1D array with 4 elements and populate element values Dim density_data(3) As Double density_data(0) = dia_min density_data(1) = dia_max density_data(2) = dia_peak density_data(3) = dia_var
' Make changes to the material to apply the Mie volume scattering with our settings above using Mean Free Path coefficient.
SetVolScatMie(matNode) SetVolScatMieParticleRefIndexData(matNode, wavelen, ref_index, imag_index, immerse_index) SetVolScatMieParticleDensityData(matNode, dia_func, density_data) SetVolScatCoefType(matNode, 1) ' 1 for "Mean free path" AddVolScatCoef( matNode, wavelen, mean_free_path )
'Set Volume Scatter model to active SetVolScatActiveFlag(matNode, True)
End Sub
See Also SetVolScatMieParticleDensityData GetVolScatMieParticleDensityData SetVolScatMieParticleRefIndexData GetVolScatMieParticleRefIndexData
|