Animating FRED Results

Many FRED analysis tasks involve some sort of parameterized scan through a set of system configurations and capturing data. In such cases compiling FRED results into an animated movie can be particularly useful for conveying the dynamic behavior of the system.

In this example the phase of a number of coherent beams is randomized and the changing interference pattern is captured in a series of Analysis Result Nodes (ARN's) which are then used to create the movie.


Once the ARN's are created they need to be stored in an array... each entry in the array becomes a frame of the movie. This happens in lines 68-80 of the script:

'get an array of all arns
Dim arns() As Long, counter As Long
counter = 0
For i = 0 To ARNGetMaxNodeNum()
	If ARNIsValidNode(i) Then
		ReDim Preserve arns( counter )
		arns( counter ) = i
		counter = counter + 1
	End If
Next i

'create mp4 file
ARNSaveToVideo(arns, 201, 201, 0, 0, 0.1, "Turbo", GetDocDir() & "\beamProp.mp4" )

The FRED file containing the full embedded script is here: Animating FRED Results

Still need help? Contact Us Contact Us