Animating the evolution of a field |
| |
Authors: | Schneider JB Flynn PJ Shlager KL |
| |
Affiliation: | Dept. of Electr. & Comput. Eng., Washington State Univ., Pullman, WA; |
| |
Abstract: | Many problems in electromagnetics involve modeling a changing multi-dimensional 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. Here, we present a relatively simple scheme to animate a changing two-dimensional field (in this case EM wave propagation is considered in particular). 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 gray-scale 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 |
| |
Keywords: | |
|
|