FRED Knowledge Base

Finding Material Errors

The attached FRED script is a very simple utility for finding surfaces where material errors have occurred.  The script’s basic implementation is the following: Loop over the ray buffer Retrieve the ray failure code for each ray Compare the failure code with the desired error...

Read More

Irradiance on a Cylindrical Surface

This knowledge base article describes a method for calculating the irradiance on a cylindrical surface using a lens edge as an example.  An embedded script is included in the example file which performs an r,θ mapping from the coordinate of a ray on the lens...

Read More

Loading Amplitude Phase Masks

The Amplitude/Phase Mask is a positional apodization used to apply custom apodizations to a source. This feature is located on the Power Tab of the Detailed Source dialog. Amplitude/Phase Mask data can be read from a file or constructed manually within the feature’s spreadsheet environment....

Read More

Plotting Surface Particulate (Mie) Scatter

As of FRED v9.110, the BSDF plot routines ignore user-selection of “Apply on Reflection” or “Apply on Transmission”.  For most scatter models there is no difference in the BSDF values and so there is no need for designation of a plot in transmission or reflection. ...

Read More

Creating a Class Module

Classes in WinWrap serve much the same purpose as libraries in FRED’s original Enable Basic. User-defined routines can be defined within a class and used to streamline your scripts. The example presented here is based upon examples in the WinWrap Help (in FRED, navigate to...

Read More

Adding Birefringent Materials from Data Files

This knowledge base article describes a FRED script (see attached file) which can be used to add a birefringent material to a FRED document using a data file.  Unlike sampled materials, there is currently no option to add birefringent material data from file through the...

Read More

Applying Importance Sampling Specifications in Script

This knowledge base article describes a method of applying importance sampling specifications to a group of surfaces at once using FRED’s scripting language.  Unlike sources, surfaces, coatings, materials, scatter models, ARN’s and raytrace control sets, scatter importance sampling specifications have no reference node on FRED’s...

Read More

Optimizing for a Target Distribution

This knowledge base article will demonstrate how to use FRED Optimum’s optimization capability to modify a system and achieve a desired irradiance distribution.  The system being modified is a PMMA light pipe.  Six variables control the shape of the light pipe and the optimization merit...

Read More

Retrieving Amplitude-Phase Mask data

This article contains a generic script for reading the contents of an existing Amplitude/Phase Mask applied to a Detailed Source, which can be helpful in debugging and verification. In this script, dialogs prompt the user for a file name where data is to be stored...

Read More