Description This function generates a new set of coherent rays from the scalar field calculated on an analysis grid. For a complete description of its intended usage and implementation, please see the Spatially Resample Field help topic. 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 = SpatiallyResampleScalarField( nAna, RefWfShp, RefWfPrms, NumGuess, ReplRays, dRelPowCut, nEnt, nMat, FldFil, ResFldFil, NRaysDel, MeritVal )
Parameters count (Long or Huge_) Number of rays created.
nAna As Long Node number of Analysis Surface. This Analysis Surface must be "attached" to the surface on which the existing coherent rays to be resampled are currently located and can have as many Ray Specification filters as necessary.
RefWfShp As Long Type of wavefront specification: 0 for tilt vector and curvature, 1 for sphere XYZ center. If the fitting algorithm is used (NumGuesses ¹0), this variable determines the dimension of the array RefWfPrms and the whether the array holds tilt vector & curvature, or sphere XYZ center.
RefWfPrms() As Double Array containing wavefront parameters. This array can function as input or output. If used as input, the array must be properly dimensioned before use. The dimension of the array depends upon RefWfShp. For RefWfShp=0, the array has four elements; elements 0 through 2 contain the X,Y,Z tilt vector and element 3 contains the wavefront curvature. For RefWfShp=1, the array has three elements; elements 0 through 2 contain the sphere X,Y,Z center coordinates. The tilt vector and the sphere center coordinates are given in the coordinate system of the Analysis Surface node nAna.
NumGuess As Long Number of guesses allowed during wavefront fitting. For NumGuess=0, fitting is disabled. In this case, RefWfPrms must be dimensioned correctly and supplied values consistent with RefWfShp.
ReplRays As Boolean Flag enabling deletion of old rays after new rays are created. True=delete old rays, False=do not delete old rays. In most cases, old rays should be deleted.
dRelPowCut As Double Rays are not created at pixel locations when the field magnitude falls below this cutoff value relative to the field power maximum.
nEnt As Long Node number of entity rays are associated with after creation.
nMat As Long Immersion material identifier for new rayset.
FldFil As String File name (*.fgd) where the scalar field of the original rayset will be stored. If a null string is used, no file is written.
ResFldFil As String File name (*.fgd) where the residual scalar field will be stored. This residual is the difference between the original scalar field and the field after wavefront parameters have been removed. If a null string is used, no file is written.
NRaysDel As Long (or Huge_) Number of rays deleted. Only rays used in the calculation will be deleted.
MeritVal As Double Value of merit function when wavefront fitting option is invoked.
See Also
|