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. An embedded script in the document rotates the beamsplitter cube through some range of user-defined angles inside of a loop and also performs a raytrace and analysis for each iteration. At the end of the script, the results from each individual raytrace are stored in the Analysis Results folder of the object tree.
The main concept being conveyed in this analysis is how to use the script commands GetOperation, SetOperation and Update. For more information on GetOperation and SetOperation and their exact usage, please refer to the FRED Help.
Download the FRED file: rotateObjectExample.frd