Description This function identifies the raytrace paths which have contributed to a region defined by polar and azimuthal angles using a directional analysis entity. An advanced raytrace must have been performed with raytrace paths enabled prior to executing this function. 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 pCount = FindPathsContributingToPolarAngularRegion( daeNode, aziMin, aziMax, polarMin, polarMax, pNums(), pPowers(), pRayCounts(), numCohIgnored, numRaysWoPaths )
Parameters pCount (Long) Returned number of ray paths found that contribute to the specified region.
daeNode As Long Node number of the directional analysis entity being used to specify the spherical polar grid and ray selection criteria.
aziMin As Double Specifies the minimum azimuth angle in the angular region being queried.
aziMax As Double Specifies the maximum azimuth angle in the angular region being queried.
polarMin As Double Specifies the minimum polar angle in the angular region being queried.
polarMax As Double Specifies the maximum polar angle in the angular region being queried.
pNums() As Long After the function has been called, this array will hold the path ID numbers that were found to have contributed to the designated angular region.
pPowers() As Double After the function has been called, this array will hold the power contributions along the corresponding path IDs being stored in the pNums() array.
pRayCounts() As Long (or Huge_) After the function has been called, this array will hold the ray counts for the corresponding path IDs being stored in the pNums() array.
numCohIgnored As Long (or Huge_) After the function has been called, this variable holds the number of coherent rays that were ignored during the calculation.
numRaysWoPaths As Long (or Huge_) After the function has been called, this variable holds the number of rays that were determined to have no associated path information.
Example This example performs an advanced raytrace with raypaths enabled and then searches for contributing paths within an angular region from 5 - 10 degrees azimuth and -5 to 5 degrees polar. The resulting paths and ray counts are reported to the output window.
Sub Main
DeleteRays ClearOutputWindow
Dim tAdv As T_ADVANCEDRAYTRACE InitAdvancedRaytrace( tAdv ) tAdv.draw = False tAdv.rayHistory = True tAdv.rayPaths = True AdvancedRaytrace( tAdv )
Dim polarAna As Long polarAna = FindFullName( "Analysis Surface(s).Analysis 1" )
Dim aziMin As Double, aziMax As Double, polarMin As Double, polarMax As Double Dim pNums() As Long, pPowers() As Double, pRayCounts() As Long Dim numCohIgnored As Long, numRaysWoPaths As Long, pCount As Long
aziMin = 5.0 : aziMax = 10.0 polarMin = -5.0 : polarMax = 5.0 pCount = FindPathsContributingToPolarAngularRegion( polarAna, aziMin, aziMax, polarMin, polarMax, _ pNums(), pPowers(), pRayCounts(), numCohIgnored, numRaysWoPaths )
Dim curpath As Long Print "" Print "Paths Contributing to Polar Angular Region:" Print "-------------------------------------------" Print "Total coherent rays ignored: " & numCohIgnored Print "Number of rays without paths: " & numRaysWoPaths Print "" Print "Total contributing ray paths within designated region: " & pCount If pCount > 0 Then Print "Path ID" & Chr(9) & "Power" & Chr(9) & "Ray Count" For curpath = 0 To UBound(pNums,1) Print pNums( curpath ) & Chr(9) & pPowers( curpath ) & Chr(9) & pRayCounts( curpath ) Next curpath End If
End Sub
See Also
|