NSTR2
Initiates a Non-sequential trace with ability to save data to a ZRD and/or PAF file.
Syntax:
NSTR surf, source, split, scatter, usepolar, ignore_errors, random_seed, save, savefilename, filter, zrd_format, savepaths, pathfilename
Discussion:
Surf is an integer value that indicates the number of the Non-sequential surface. If the program mode is set to Non-Sequential, use 1. Source refers to the object number of the desired source. If source is zero, all sources will be traced. If Split is non-zero, then splitting is on, otherwise, ray splitting is off. If Scatter is non-zero, then scattering is on, otherwise scattering is off. If Usepolar is non-zero then polarization will be used, otherwise polarization is off. If splitting is on polarization is automatically selected. If ignore_errors is non-zero, then errors will be ignored, otherwise ray errors will terminate the non-sequential trace and macro execution and an error will be reported.
Save, savefilename, and zrd_format refer to saving ZRD, DAT, or SDF files. If save is omitted or is zero, the arguments savefilename, filter, and zrd_format need not be supplied. If save is not zero, the rays will be saved to a file. The saved data file will have the name specified by the savefilename. The file naming convention and destination folder are the same as described in "Saving ray data to a file". The extension of savefilename should be provided, but no path should be specified. For ZRD files, the zrd_format can be 0, 1, or 2 for uncompressed full data, compressed basic data, or compressed full data, respectively. For more information on ZRD formats see "Ray database (ZRD) files".
Savepaths and pathfilename control the saving of a PAF file and have similar requirements to thesave and savefilename arguments above. If savepaths is not zero, the rays will be saved to a PAF file with a name specified by pathfilename. The extension .paf should be specified at the end of the savefilename string.
If either save or savepaths is not zero, then the optional filter name is either a string variable with the filter, or the literal filter in double quotes. If no filter is being used, enter an empty pair of double quotes like this: "". For information on filter strings see "The Filter String".
NSTR2 always calls UPDATE before tracing rays to make certain all objects are correctly loaded and updated.
Related Functions:
NSTR
NSDD
Example:
NSTR2 1, 0, 0, 0, 0, 1, 0, 1, "saverays.ZRD", "h2", 0, 1, "saverays.PAF"
Next: