Description Retrieves the ray position specification parameters from a source with ray positions type "Random volume". Depending on the number of rays traced, it may be necessary to dimension ray index and ray counter variables as data type Huge_ instead of Long. Please see Multi-threaded Raytracing for more information.
Syntax success = GetSourcePosVolumeRandom ( n, semiWidthX, semiWidthY, semiWidthZ, numRays, shape )
Parameters success (Boolean) True if the function was successful, False otherwise.
n As Long Node number of the source.
semiWidthX As Double Returns the X semi-width of the volume.
semiWidthY As Double Returns the Y semi-width of the volume.
semiWidthZ As Double Returns the Z semi-width of the volume.
numRays As Long (or Huge_) Returns the total number of random ray positions.
shape As String Returns the shape of the volume. Will be one of the following: "Spheroid", "Box", "Cylinder", "X-Cylinder" or "Y-Cylinder". The "Cylinder" return value corresponds to a Z-cylinder.
Example The example below demonstrates how to retrieve the Random Volume ray positions specification from a source, modify the number of ray positions and then set the modified values back to the source node.
Sub Main
Dim src As Long, sx As Double, sy As Double, sz As Double Dim n As Long, shp As String src = FindFullName( "Optical Sources.Source 1" )
GetSourcePosVolumeRandom( src, sx, sy, sz, n, shp ) n = 1500 SetSourcePosVolumeRandom( src, sx, sy, sz, n, shp ) Update
End Sub
See Also
|