Navigation: Scripting Reference Manual > Functions & Subroutines > CreateRaysFromScalarField

 

CreateRaysFromScalarField

 

Contact Us: fredsupport@photonengr.com

 

Description

Creates a rayset by Gabor synthesis from the specified arrays containing real and imaginary components using settings from the T_SYNTH_RAYS_FROM_FIELD structure.  The synthesized rayset will propagate along the +Z axis of the associated analysis grid.  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

count = CreateRaysFromScalarField( nCoordSys, ana, real, imag, raysynth, wave, npol )

 

Parameters

count (Long or Huge_)

Number of rays used in Scalar Field calculation.

 

nCoordSys As Long

Node number of the FRED entity whose coordinate system the ana structure is expressed in.

 

ana As T_ANALYSIS

T_ANALYSIS structure used to define a planar sample area over which the calculation will be performed.

 

real() As Double

Array to be loaded with the real component of the scalar wave field.

 

imag() As Double

Array to be loaded with the imaginary component of the scalar wave field.

 

raysynth As T_SYNTH_RAYS_FROM_FIELD

Structure containing Gabor synthesis settings.

 

wave As Double

Wavelength (in microns) of field to be synthesized.

 

npol As Long

Integer indicating polarization of created rays. 0 for unpolarized, 1 for X-polarized, 2 for Y-polarized.

 

Remarks

Creates a rayset by Gabor synthesis from the specified arrays containing real and imaginary components using settings from the T_SYNTH_RAYS_FROM_FIELD structure.

 

Rays created by this method are added directly to the ray buffer with a default Append operation. If the intent is to replace existing rays with the newly created ones, simply issue a DeleteRays command prior to ray creation.

 

See Also

ScalarField

VectorField

ScalarFieldToFile

VectorFieldToFile

CreateRaysFromScalarFieldFile

CreateRaysFromVectorField

CreateRaysFromVectorFieldFile

ClipFieldInFile

T_SYNTH_RAYS_FROM_FIELD

Irradiance

Intensity

EnergyDensity

T_ANALYSIS

LoadAnalysis

SetAnalysisParameters

 

 

 

 

 

Copyright © Photon Engineering, LLC