FRED Knowledge Base

Compute Distance Between Objects

The attached FRED file contains an embedded script which shows how you can calculate the distance between two objects using the scripting language. The script works by using the TransformPosition command, which takes a starting coordinate system, a new coordinate system and a position vector...

Read More

CAD Surface Position and Orientation

When FRED imports a CAD model, all of its surfaces are defined by NURBs, or trimmed versions of those NURBs called Trimmed Parametrics. These parametric surfaces are always defined in the global coordinate system. One of the major difficulties with this definition is that the...

Read More

Rotating an Object in Scripting

The attached FRED file demonstrates how to use the scripting language to rotate an object through some range of angles in a loop.  Conceptually, the setup is very simple.  We have a focusing ray bundle which passes through a beamsplitter cube down to a detector....

Read More

Analysis Surface Script Commands

This article is intended to clarify any confusion between several of the scripting commands that are commonly used for analysis surfaces. Analysis surfaces themselves have three defining parameters, their sampling grid, ray filters, and location in space. They can also be used to generate Analysis...

Read More

List Surfaces with Assigned Coating

While making FRED models that had many surfaces and a few different coatings applied throughout the system, I noticed that it became very time consuming to verify that all of the coatings are applied to the correct surfaces since it can only be done surface by surface. The example...

Read More

Axicon Lens Example

This is a model of a Thorlabs Axicon Lens AX2520-UV which is used in this model to convert a plane wave input beam into a ring profile. The raytrace is performed coherently using FRED’s Gaussian Beam Decomposition technique. To minimize ray errors at the center...

Read More

Radial Varying Coating

Coatings can be applied to any surface in FRED, with many different options available.  For specific solutions the user can define a general Script Coating which allows reflection and transmission coefficients to be computed based on ray position, polarization, angle of incidence, wavelength and the...

Read More

Cassegrain Telescope Builder

A while ago, I was reading through Joe Geary’s excellent book, “Introduction to Lens Design” 1, and it occurred to me that his first order construction of a Cassegrain telescope could be very easily written up as a BASIC script in FRED. The example file that...

Read More

Stepped Advanced Raytrace with Analyses

It is important to remember that Analysis Surfaces in FRED only post-process (filter) rays at the end of the raytrace when an analysis is requested.  They do not collect ray information during the raytrace, regardless of whether the ray trajectory passes through the analysis grid. ...

Read More

Beam Footprint Analysis

It is important to remember that Analysis Surfaces in FRED only post-process (filter) rays at the end of the raytrace when an analysis is requested.  They do not collect ray information during the raytrace, regardless of whether the ray trajectory passes through the analysis grid. ...

Read More