Navigation: Scripting Reference Manual > Functions & Subroutines > CreateRaysFromScalarFieldFile

 

CreateRaysFromScalarFieldFile

 

Contact Us: fredsupport@photonengr.com

 

Description

Creates a rayset by Gabor synthesis from the specified complex scalar field file using settings from the T_SYNTH_RAYS_FROM_FIELD structure.  The synthesized rayset will propagate along the +Z axis of the associated analysis grid that generated the scalar field.  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 = CreateRaysFromScalarFieldFile( fname, raysynth, npol )

 

Parameters

count (Long or Huge_)

Number of rays created by the Scalar Field synthesis.

 

fname As String

Name of file containing scalar field data. This file must be created using the ScalarFieldToFile command.

 

raysynth As T_SYNTH_RAYS_FROM_FIELD

Structure containing Gabor synthesis settings.

 

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 complex scalar field file using settings from the T_SYNTH_RAYS_FROM_FIELD structure.

 

This command can also read a vector complex field file. When reading a vector file, npol can take on only the values 1 for X-polarized or 2 for Y-polarized. When npol = 1, only the X-component of the vector field is used. When npol = 2, only the Y-component of the vector field is used.

 

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

CreateRaysFromScalarField

CreateRaysFromVectorField

CreateRaysFromVectorFieldFile

ClipFieldInFile

T_SYNTH_RAYS_FROM_FIELD

Irradiance

Intensity

EnergyDensity

T_ANALYSIS

LoadAnalysis

SetAnalysisParameters

 

 

 

 

 

Copyright © Photon Engineering, LLC