Next: Introduction
Animating the Evolution of a Field
John B. Schneider, Patrick J. Flynn
, and
Kurt L. Shlager
Abstract:
Many problems in electromagnetics involve modeling a changing
multidimensional field and one can often gain insight into the
underlying physical problem by animating the changes. The ability to
view directly the evolving field may also provide a useful debugging
tool during modeling and simulation. In the past, a great deal of
programming effort or the purchase of expensive commercial software
was required to produce such animations. Here we present a relatively
simple scheme to animate a changing two-dimensional field (which can
be a ``slice'' through a computational domain of higher dimensions).
The scheme permits various mappings of field values to colors so that
the color of each pixel in an image indicates the field found at the
corresponding location within the computational domain.
Alternatively, a grayscale mapping can be used. A program used to
construct individual frames of the animation is presented in full.
Sufficient detail is given so that the customization of the code is
straightforward. Public-domain software is used to view the frames as
an animated sequence or to generate an MPEG file. Some aspects of the
scheme described here are tailored for use in an X-windows or UNIX
environment, but most of the important steps are independent of the
operating system. Frame generation routines are presented in Fortran
(C versions of the code are similar and can be obtained ``on-line'').
The scheme presented here is relatively fast, efficient, and flexible
and should serve well as a starting point for those wanting to ``roll
their own'' graphics. In addition, for those needing more
sophisticated renderings, pointers are given to several powerful
commercial and public domain graphics packages.
John Schneider
Sun Sep 22 11:57:43 PDT 1996