Creating MPEG animations using xfpp3d / xflat2d
The visualization utilities xfpp3d and xflat2d both have a
box-less button labelled Mpeg located near the upper right
of their respective GUIs. Clicking on the button will bring up the
mpeg window:
The widgets in this window function as follows:
- Name: This text type-in specifies the name of the mpeg file that
is to be generated. The file name must have an extension .mpg,
.MPG, .mpeg or .MPEG.
- WD: This text type-in specifies the directory in which the mpeg
file is to be created. The (temporary) jpeg-format images that are
used in the generation of the animation are also stored in this directory.
- Seq No.: This output-only text widget displays the sequence number for
the next jpeg-format image that will be created in record mode.
- Control: This set of radio buttons controls the creation and playback
of mpeg animations as follows:
- Off: When this button is pressed, recording of images is disabled. This
is the default mode of operation.
- Record: When this button is pressed, and when the main GUI's Pause
button is not activated, every refresh (redisplay) of the
main GUI graphics window will result in the capture of the graphics area as a
jpeg image with a filename <Name>.<Seq. No.>.jpg,
followed by an incrementing of Seq. No..
- Generate: Pressing this button will result in the generation of
an mpeg animation with filename Name using the jpeg
images with sequence numbers from 1 to Seq. No. - 1 that were
previously created via the Record operation. The user is prompted to
confirm overwrite if the generate will clobber an existing file.
- Playback: When this button is pressed, mpeg_play is invoked
to play back the mpeg animation, Name.
- The output-only browser area at the bottom of the panel displays all mpeg
files contained in the working directory. The file corresponding to Name,
should it exist, is highlighted in red.
Following is a recommended sequence of operations for the creation of an
animation using either of the two utilities:
- Prepare the data to be animated via a user program and redirection of
standard output to a file. This will in general include a choice of an
appropriate number of time steps for the animation.
- Start xflat2d / xfpp3d with standard input redirected from
the file generated in the previous step. Keeping the Pause button
activated, adjust the view of the data (using Zoom in/out, Tumble
speed etc.) as appropriate.
- Bring up the mpeg panel, and depress Record.
- Deactivate the Pause button in the main GUI to initiate
the recording process.
- When all time steps of the data have been visualized, reactivate the
Pause function.
- Press Generate on the mpeg panel to make the mpeg
animation.
- Press Playback to verify that the animation was properly created.