Academia.eduAcademia.edu

Virtual Reality Visualization of 3-D Electromagnetic Fields

One of the major problems in three-dimensional (3-D) electromagnetic field computation is visualizing the calculated field. Virtual reality techniques can be used as an aid to this process by providing multiple viewpoints, allowing immersion within the field, and taking advantage of the human ability to process 3-D spatial information. In this paper we present an example of 3-D electromagnetic field visualization in the CAVE virtual-reality environment. 1 Introduction Electromagnetic field analysis and design are more difficult in three dimensions than in two. Not only is the mathematics more complex (multiple-valued scalar potentials, gauge conditions on vector potentials), but so are the visualization aspects. The complexity arises from the greater amount of data (more mesh points, more field components per mesh point) and the desire to view the computational mesh and electromagnetic field calculations together. Scientific visualization of three-dimensional (3-D) vector fields, su...

Virtual Reality Visualization of 3-D Electromagnetic Fields Milana Huang David Leviney Larry Turnerz Michael Papkay Lauri Kettunenx Abstract One of the major problems in three-dimensional (3-D) electromagnetic eld computation is visualizing the calculated eld. Virtual reality techniques can be used as an aid to this process by providing multiple viewpoints, allowing immersion within the eld, and taking advantage of the human ability to process 3-D spatial information. In this paper we present an example of 3-D electromagnetic eld visualization in the CAVE virtual-reality environment. 1 Introduction Electromagnetic eld analysis and design are more dicult in three dimensions than in two. Not only is the mathematics more complex (multiple-valued scalar potentials, gauge conditions on vector potentials), but so are the visualization aspects. The complexity arises from the greater amount of data (more mesh points, more eld components per mesh point) and the desire to view the computational mesh and electromagnetic eld calculations together. Scienti c visualization of three-dimensional (3-D) vector elds, such as electromagnetic elds, has been accomplished with a number of techniques [2]. The simplest of these is to place an icon within the data eld to express local characteristics of the eld. The icon can be an arrow plot or probe [4]. An arrow is a line segment whose length is proportional to the magnitude of the vector and whose orientation depicts the vector's direction. A probe is a set of graphic primitives expressing a number of local characteristics such as curvature and torsion. Global characteristics of the 3-D vector eld can be expressed by watching a particle as it is \dropped" and advanced through the eld. The resulting streamline traces out the path that a massless particle would take through the eld, with every point on the streamline tangent to the vector eld. Two or more particles advanced through the eld can sweep out a surface or ribbon. A streamsurface consists of many individual particles that combine particle and surface techniques [9]. Each particle is modeled as a small part of a surface. The resulting surface can  y z x Electronic Visualization Laboratory, University of Illinois at Chicago, Chicago, IL 60607. Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL 60439. Advanced Photon Source, Argonne National Laboratory, Argonne, IL 60439. Tampere University of Technology, FIN-33610, Tampere, Finland. express global characteristics such as gradual twist in the eld. Particles rendered on the surface can express more local characteristics, such as velocity, for example by blurring the particle if the velocity in that area is large. Volume visualization can also be used to visualize vector elds. An isosurface is generated by de ning a function that interprets vector values into scalar values, such as magnitude for electromagnetic elds [11]. All points that are above (below) a speci ed scalar value generate a surface. Although such techniques are widely used, limitations still exist. These include being able to view the eld only from a single location and orientation, not seeing the entire data set at once, and trying to visualize a 3-D quantity with two-dimensional techniques. Virtual reality (VR) allows new ways to visualize electromagnetic elds that overcome these limitations. To show the promise of VR techniques for 3-D electromagnetic eld visualization, we discuss the use of VR to visualize the magnetic eld of an accelerator magnet. VR can be particularly useful in the design phase of such magnets, which is complicated by the three-dimensional aspects of the problem, the variety of design parameters that exist, and the amount of computation time involved in parametric design studies. 2 Virtual Reality A virtual reality system provides immersion and interactivity. Immersion is achieved through visual and audio cues. Visual cues include wide eld of view, stereo display, and viewer-centered perspective. Audio cues include localized sound and synthesized sound. Interactivity refers to the real-time involvement the user must have with the perceived environment. Virtual reality strives to be a natural user interface. It allows the scientist to focus the data, rather than the computer interface [5]. The objective is an environment that our senses are accustomed to and process well, in particular, 3-D spatial information [6]. A variety of technologies exist to enable virtual environments. Visual displays are implemented with cathode ray tube (CRT) or liquid crystal display technology. These displays can be free standing or placed on head-mounted units. CRTs are also used to project onto large screens. Correct stereoscopic images are sent to the viewer's eyes by using two displays, one for each eye, or by using one display with shuttered or polarized glasses. The viewer's position and movements are tracked by magnetic or ultrasonic sensors [1]. Control devices include the dataglove and the force-feedback joystick [6]. The CAVE1 (CAVE Automatic Virtual Environment) [3] is the virtual reality system we used. The CAVE is a three-meter cube in which the user is surrounded by stereoscopic computer images rendered on the walls and oor. Left- and right-eye views are computed 48 times per second for each eye. A person standing inside the CAVE wears LCD shutter glasses that synchronize the left and right eye views, giving the illusion of three-dimensional immersion. The user is tracked by an electromagnetic tracking system, so that his or her instantaneous position and orientation are known. This system allows the environment to be rendered in correct viewer1 The Cave and ImmersaDesk are trademarks of the Board of Trustees at the University of Illinois 2 Figure 1: The CAVE virtual reality environment. Computer images sent to the projectors are folded by the mirrors and directed onto the CAVE walls and oor. centered perspective. The CAVE resolution is 1024  760 pixels. The user is able to manipulate objects within the CAVE by using a wand, a three-dimensional analog of the mouse of current computer workstations. The CAVE allows multiple users to share the virtual environment by donning a pair of shutter glasses and stepping into the cube structure. Figure 1 is a picture of the CAVE environment. CAVE applications are typically written in C or C++ and rely upon a library of CAVE system calls to easily integrate the program into the virtual reality environment. The CAVE library manages the computation of user-centered perspective, synchronization of frames across the walls, and tracking and wand I/O. 3 Accelerator Magnet Case Study As an example of the use of virtual-reality for 3-D electromagnetic eld visualization, we use an accelerator magnet from the Advanced Photon Source (APS) at Argonne National Laboratory. The APS is a synchrotron radiation facility that, when completed, will produce extremely brilliant x-ray beams that will allow scientists to study smaller samples, more complex systems, and faster reactions and processes than ever before. The x-rays are produced by accelerating a positron (positively charged electron) beam that orbits the APS storage ring with an energy of seven billion electron volts. Special arrays of 3 Figure 2: One half-period of the elliptical multipole wiggler magnet. One pair of poles and coils for the electromagnet is shown on the left and right. One pair of permanent magnets is on the top and bottom. One pair of half-poles for the hybrid magnets is at the front, and another pair is at the back. Note that the hybrid-magnet poles and electromagnetic poles are a quarter-period apart. magnets, called insertion devices, manipulate the positron beam in order to x its energy and increase its brilliance. One such device is a wiggler magnet. In a wiggler magnet, the magnetic eld periodically alternates in direction. The transverse acceleration of the positrons by this alternating eld produces the x-radiation. Wiggler magnets produce very intense, but incoherent, radiation over a wide range of energies. The particular design of a wiggler magnet determines the brightness and spectrum of the x-ray radiation emitted. These tuned x-ray beams are then further processed by optical instrumentation before they strike the sample being studied. The subject of our work was the visualization of the magnetic eld of the elliptical multipole wiggler magnet (EMW) [8]. The EMW combines an electromagnet providing a horizontal eld with a hybrid magnet providing a vertical eld. (In a hybrid magnet, permanent magnet material generates the eld, and steel poles shape it.) The poles of the two series of magnets are 90 degrees apart, so that the eld from the hybrid magnet is strongest where the eld from the electromagnet is zero, and vice versa. Figure 2 shows a single half-period of the EMW and extends from the center of one pair of hybrid magnet poles at the front to the next at the back. The poles are joined by one pair of permanent magnets at the top and bottom. Halfway between the poles of the hybrid magnets are a pair of poles and coils for the electromagnets on the left and right. The vertical pole gap is 24 mm, and the horizontal pole gap is 71 mm. The peak vertical eld is 0.9 T, and the peak horizontal eld is 0.1 T. The full EMW magnet is an array consisting of a total of 18 periods. 4 Figure 3: Four half-periods of the EMW displayed in the CAVE simulator 4 Virtual Reality Implementation Our CAVE simulation depicts the magnet geometry, the eld pattern from the combined magnets, and the trajectory of the positron beam traversing the EMW. The user interacts with the simulation as described below. 4.1 Magnet and Field Display The visualization displays (up to) four half-periods of the EMW magnet geometry and the calculated magnetic eld. The eld computations were carried out using the 3-D magnetostatics program TOSCA [10], and the magnet geometry was reconstructed from an OPERA [10] data set with the code CORAL [7]. The geometry of the magnet gives the physical context in which to display the calculated magnetic eld. Figure 3 from the CAVE simulator shows an \outside looking in" view of four half-periods of the EMW magnet. The magnetic eld is displayed in the interior of the EMW on a 3-D grid of points. An icon (either a cone or a cylindrical bar) is used to represent the magnet eld value. The icon is 5 Figure 4: Path of the positron beam displayed in the CAVE simulator oriented in the direction of the magnetic eld at that point in space. The icon's color and size are a function of the vector's magnitude at that point. A compile-time parameter allows the user to specify the number of icons used to display the magnetic eld. This capability can be useful when there are many 3-D grid points and the number of icons overwhelms the user's ability to comprehend the results. For a similar reason, we display only one half-period of the magnetic eld, irrespective of the number of half periods of the magnet that are displayed. 4.2 Beam Trajectory The particle beam trajectory through the EMW magnetic eld was calculated and then displayed during the simulation. The positrons move in a helical path controlled by the strength of the current in the coils of the electromagnet. A tracer sphere dynamically follows the calculated trajectory. At the maximum/minimum excursion in the horizontal plane (which occurs when the beam passes through the permanent magnet poles), the simulation displays a ash to indicate that x-ray energy is emitted. Figure 4 shows the path of the positron beam through the magnetic eld in the CAVE simulator. The trajectory is a attened helix because the vertical eld is 0.9 T and the horizontal eld is only 0.1 T. When displaying the trajectory we use a scale factor in the horizontal and vertical directions to enhance the visibility of the beam. The trajectory is not scaled in the beam direction. The scale factor is large because the transverse displacements are on a micron scale. 4.3 Interactive Use Six options are available for interacting with the simulation in the CAVE. These options are provided via a 3-D interface: a menu displayed on the left wall of the CAVE. The wand is used 6 to select the desired menu item. The rst option toggles the icon used to represent the magnetic eld between the cones and cylindrical bars. The next two menu items allow the user to displace or rotate the complete simulation, respectively. Although the user's position and orientation in the CAVE are known, thereby allowing the environment to be rendered in correct viewer-centered perspective, we found it advantageous to be able to use the wand to enable/disable additional translation and/or rotation of the magnet geometry. By using the wand for translation, one can push or pull the magnet and eld to a desired location for viewing without \walking into" one of the CAVE walls. Similarly, the wand allows for easy 360 degree rotation about the vertical axis. The fourth option allows the user to specify the number of half-periods of the EMW magnet to display. There are 18 full periods in the EMW array. However, since the eld is periodic, and displaying all 18 periods would overwhelm the user with data, we limit to four the maximum number of half-periods displayed. If the user chooses to display zero half-periods the magnetic eld is shown without the context of the magnet's geometry. The fth option toggles the display of the particle that traces the positron beam's trajectory. The beam trajectory and displayed eld can be changed by the sixth option, the magnitude of a scale factor for the current in the electromagnet. The scale factor simulates the increase in current in the electromagnet, leading to a horizontal eld of up to 1.0 T. This option intuitively demonstrates to the user the relationship between the electromagnet's eld strength and the (approximated) changes in orientation and magnitude of the resulting vector eld and beam trajectory. 5 Discussion We found that virtual-reality provides a new way to view 3-D electromagnetic eld calculations. In contrast to traditional plane-at-a-time or 2-D mappings of 3-D data, the user obtains a panoramic view of the eld. He or she may move freely about the virtual environment and explore the electromagnetic eld from many di erent angles. By changing viewpoint, one can easily overcome the e ect of obstructions to visualize the geometry and eld patterns. Compared with viewing the eld data externally, the CAVE allowed us to \step into the eld" and view the eld from the inside out. This view provided a strong sense of immersion and participation that increased our level of understanding of the eld generated by the EMW magnet. This intuitive understanding is often dicult to achieve through conventional scienti c visualization. An important advantage of the CAVE environment is that multiple users can simultaneously share the virtual experience. In our case, both the magnet designer and end user of the electromagnetic eld can observe the eld behavior and positron orbit as, for example, the electromagnet current varies. This mode of collaboration can allow a large part of the design and testing of an electromagnetic device to be done in a virtual environment before costly physical prototypes are constructed. Several possibilities for future enhancements exist. These include representing the magnetic 7 eld with ux lines or ux tubes, using cutting planes of arbitrary orientation to show eld variation, and varying the starting position and angle of the positron beam to explore the edge e ects felt as it enters the eld of the wiggler magnet. Acknowledgments We thank Roger Dejus for calculating the positron trajectory through the wiggler and making computer codes available to us. The work of the second author was supported by the Mathematical, Information, and Computational Sciences Division subprogram of the Oce of Computational and Technology Research, U.S. Department of Energy, under Contract W-31109-Eng-38. The work of the third author was supported by the Oce of Basic Energy Science, U.S. Department of Energy, under Contract W-31-109-Eng-38. References [1] G. Burdea and P. Coi et. Virtual Reality Technology. John Wiley & Sons, New York, 1994. [2] R. Craw s, N. Max, and B. Becker. Vector eld visualization. IEEE Computer Graphics and Applications, 14(5):50{56, 1994. [3] C. Cruz-Neira, D. Sandin, and T. DeFanti. Surround-screen projection-based virtual reality: The design and implementation of the CAVE. In ACM SIGGRAPH '93 Proceedings, pages 135{142. Lawrence Erlbaum Associates, 1993. [4] W. de Leeuw and J. van Wijk. A probe for local ow eld visualization. In IEEE Visualization '93 Conference Proceedings, pages 39{45, 1993. [5] G. Bishop et al. Research directions in virtual environments. Computer Graphics, 26(3):153{ 177, 1992. [6] R. Kalawsky. The Science of Virtual Reality and Virtual Environments. Addison-Wesley, New York, 1993. [7] L. Kettunen, K. Forsman, D. Levine, and W. Gropp. Volume integral equations in nonlinear 3-d magnetostatics. International Journal of Numerical Methods in Engineering, 38:2655{ 2675, 1995. [8] P. Montano, G. Knapp, G. Jennings, E. Gluskin, E. Traktenberg, I. Vasserman, P. Ivanov, D. Frachon, E. Moog, L. Turner, G. Shenoy, M. Bedzyk, M. Ramanathan, A. Beno, and P. Cowan. Elliptical multipole wiggler facility at the advanced photon source. Review of Scienti c Instruments, 66:1839{1841, 1995. [9] J. van Wijk. Rendering surface-particles. In IEEE Visualization '92 Conference Proceedings, pages 54{61, 1992. [10] Vector Fields Ltd., Oxford, U.K. TOSCA Reference Manual. [11] R. Wang and R. Madison. Interactive visualization and programming|a 3d vector eld visualization. IEEE Transactions on Magnetics, 29(2):1997{2000, 1993. 8
Virtual Reality Visualization of 3-D Electromagnetic Fields Milana Huang David Leviney Larry Turnerz Michael Papkay Lauri Kettunenx Abstract One of the major problems in three-dimensional (3-D) electromagnetic eld computation is visualizing the calculated eld. Virtual reality techniques can be used as an aid to this process by providing multiple viewpoints, allowing immersion within the eld, and taking advantage of the human ability to process 3-D spatial information. In this paper we present an example of 3-D electromagnetic eld visualization in the CAVE virtual-reality environment. 1 Introduction Electromagnetic eld analysis and design are more dicult in three dimensions than in two. Not only is the mathematics more complex (multiple-valued scalar potentials, gauge conditions on vector potentials), but so are the visualization aspects. The complexity arises from the greater amount of data (more mesh points, more eld components per mesh point) and the desire to view the computational mesh and electromagnetic eld calculations together. Scienti c visualization of three-dimensional (3-D) vector elds, such as electromagnetic elds, has been accomplished with a number of techniques [2]. The simplest of these is to place an icon within the data eld to express local characteristics of the eld. The icon can be an arrow plot or probe [4]. An arrow is a line segment whose length is proportional to the magnitude of the vector and whose orientation depicts the vector's direction. A probe is a set of graphic primitives expressing a number of local characteristics such as curvature and torsion. Global characteristics of the 3-D vector eld can be expressed by watching a particle as it is \dropped" and advanced through the eld. The resulting streamline traces out the path that a massless particle would take through the eld, with every point on the streamline tangent to the vector eld. Two or more particles advanced through the eld can sweep out a surface or ribbon. A streamsurface consists of many individual particles that combine particle and surface techniques [9]. Each particle is modeled as a small part of a surface. The resulting surface can  y z x Electronic Visualization Laboratory, University of Illinois at Chicago, Chicago, IL 60607. Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL 60439. Advanced Photon Source, Argonne National Laboratory, Argonne, IL 60439. Tampere University of Technology, FIN-33610, Tampere, Finland. express global characteristics such as gradual twist in the eld. Particles rendered on the surface can express more local characteristics, such as velocity, for example by blurring the particle if the velocity in that area is large. Volume visualization can also be used to visualize vector elds. An isosurface is generated by de ning a function that interprets vector values into scalar values, such as magnitude for electromagnetic elds [11]. All points that are above (below) a speci ed scalar value generate a surface. Although such techniques are widely used, limitations still exist. These include being able to view the eld only from a single location and orientation, not seeing the entire data set at once, and trying to visualize a 3-D quantity with two-dimensional techniques. Virtual reality (VR) allows new ways to visualize electromagnetic elds that overcome these limitations. To show the promise of VR techniques for 3-D electromagnetic eld visualization, we discuss the use of VR to visualize the magnetic eld of an accelerator magnet. VR can be particularly useful in the design phase of such magnets, which is complicated by the three-dimensional aspects of the problem, the variety of design parameters that exist, and the amount of computation time involved in parametric design studies. 2 Virtual Reality A virtual reality system provides immersion and interactivity. Immersion is achieved through visual and audio cues. Visual cues include wide eld of view, stereo display, and viewer-centered perspective. Audio cues include localized sound and synthesized sound. Interactivity refers to the real-time involvement the user must have with the perceived environment. Virtual reality strives to be a natural user interface. It allows the scientist to focus the data, rather than the computer interface [5]. The objective is an environment that our senses are accustomed to and process well, in particular, 3-D spatial information [6]. A variety of technologies exist to enable virtual environments. Visual displays are implemented with cathode ray tube (CRT) or liquid crystal display technology. These displays can be free standing or placed on head-mounted units. CRTs are also used to project onto large screens. Correct stereoscopic images are sent to the viewer's eyes by using two displays, one for each eye, or by using one display with shuttered or polarized glasses. The viewer's position and movements are tracked by magnetic or ultrasonic sensors [1]. Control devices include the dataglove and the force-feedback joystick [6]. The CAVE1 (CAVE Automatic Virtual Environment) [3] is the virtual reality system we used. The CAVE is a three-meter cube in which the user is surrounded by stereoscopic computer images rendered on the walls and oor. Left- and right-eye views are computed 48 times per second for each eye. A person standing inside the CAVE wears LCD shutter glasses that synchronize the left and right eye views, giving the illusion of three-dimensional immersion. The user is tracked by an electromagnetic tracking system, so that his or her instantaneous position and orientation are known. This system allows the environment to be rendered in correct viewer1 The Cave and ImmersaDesk are trademarks of the Board of Trustees at the University of Illinois 2 Figure 1: The CAVE virtual reality environment. Computer images sent to the projectors are folded by the mirrors and directed onto the CAVE walls and oor. centered perspective. The CAVE resolution is 1024  760 pixels. The user is able to manipulate objects within the CAVE by using a wand, a three-dimensional analog of the mouse of current computer workstations. The CAVE allows multiple users to share the virtual environment by donning a pair of shutter glasses and stepping into the cube structure. Figure 1 is a picture of the CAVE environment. CAVE applications are typically written in C or C++ and rely upon a library of CAVE system calls to easily integrate the program into the virtual reality environment. The CAVE library manages the computation of user-centered perspective, synchronization of frames across the walls, and tracking and wand I/O. 3 Accelerator Magnet Case Study As an example of the use of virtual-reality for 3-D electromagnetic eld visualization, we use an accelerator magnet from the Advanced Photon Source (APS) at Argonne National Laboratory. The APS is a synchrotron radiation facility that, when completed, will produce extremely brilliant x-ray beams that will allow scientists to study smaller samples, more complex systems, and faster reactions and processes than ever before. The x-rays are produced by accelerating a positron (positively charged electron) beam that orbits the APS storage ring with an energy of seven billion electron volts. Special arrays of 3 Figure 2: One half-period of the elliptical multipole wiggler magnet. One pair of poles and coils for the electromagnet is shown on the left and right. One pair of permanent magnets is on the top and bottom. One pair of half-poles for the hybrid magnets is at the front, and another pair is at the back. Note that the hybrid-magnet poles and electromagnetic poles are a quarter-period apart. magnets, called insertion devices, manipulate the positron beam in order to x its energy and increase its brilliance. One such device is a wiggler magnet. In a wiggler magnet, the magnetic eld periodically alternates in direction. The transverse acceleration of the positrons by this alternating eld produces the x-radiation. Wiggler magnets produce very intense, but incoherent, radiation over a wide range of energies. The particular design of a wiggler magnet determines the brightness and spectrum of the x-ray radiation emitted. These tuned x-ray beams are then further processed by optical instrumentation before they strike the sample being studied. The subject of our work was the visualization of the magnetic eld of the elliptical multipole wiggler magnet (EMW) [8]. The EMW combines an electromagnet providing a horizontal eld with a hybrid magnet providing a vertical eld. (In a hybrid magnet, permanent magnet material generates the eld, and steel poles shape it.) The poles of the two series of magnets are 90 degrees apart, so that the eld from the hybrid magnet is strongest where the eld from the electromagnet is zero, and vice versa. Figure 2 shows a single half-period of the EMW and extends from the center of one pair of hybrid magnet poles at the front to the next at the back. The poles are joined by one pair of permanent magnets at the top and bottom. Halfway between the poles of the hybrid magnets are a pair of poles and coils for the electromagnets on the left and right. The vertical pole gap is 24 mm, and the horizontal pole gap is 71 mm. The peak vertical eld is 0.9 T, and the peak horizontal eld is 0.1 T. The full EMW magnet is an array consisting of a total of 18 periods. 4 Figure 3: Four half-periods of the EMW displayed in the CAVE simulator 4 Virtual Reality Implementation Our CAVE simulation depicts the magnet geometry, the eld pattern from the combined magnets, and the trajectory of the positron beam traversing the EMW. The user interacts with the simulation as described below. 4.1 Magnet and Field Display The visualization displays (up to) four half-periods of the EMW magnet geometry and the calculated magnetic eld. The eld computations were carried out using the 3-D magnetostatics program TOSCA [10], and the magnet geometry was reconstructed from an OPERA [10] data set with the code CORAL [7]. The geometry of the magnet gives the physical context in which to display the calculated magnetic eld. Figure 3 from the CAVE simulator shows an \outside looking in" view of four half-periods of the EMW magnet. The magnetic eld is displayed in the interior of the EMW on a 3-D grid of points. An icon (either a cone or a cylindrical bar) is used to represent the magnet eld value. The icon is 5 Figure 4: Path of the positron beam displayed in the CAVE simulator oriented in the direction of the magnetic eld at that point in space. The icon's color and size are a function of the vector's magnitude at that point. A compile-time parameter allows the user to specify the number of icons used to display the magnetic eld. This capability can be useful when there are many 3-D grid points and the number of icons overwhelms the user's ability to comprehend the results. For a similar reason, we display only one half-period of the magnetic eld, irrespective of the number of half periods of the magnet that are displayed. 4.2 Beam Trajectory The particle beam trajectory through the EMW magnetic eld was calculated and then displayed during the simulation. The positrons move in a helical path controlled by the strength of the current in the coils of the electromagnet. A tracer sphere dynamically follows the calculated trajectory. At the maximum/minimum excursion in the horizontal plane (which occurs when the beam passes through the permanent magnet poles), the simulation displays a ash to indicate that x-ray energy is emitted. Figure 4 shows the path of the positron beam through the magnetic eld in the CAVE simulator. The trajectory is a attened helix because the vertical eld is 0.9 T and the horizontal eld is only 0.1 T. When displaying the trajectory we use a scale factor in the horizontal and vertical directions to enhance the visibility of the beam. The trajectory is not scaled in the beam direction. The scale factor is large because the transverse displacements are on a micron scale. 4.3 Interactive Use Six options are available for interacting with the simulation in the CAVE. These options are provided via a 3-D interface: a menu displayed on the left wall of the CAVE. The wand is used 6 to select the desired menu item. The rst option toggles the icon used to represent the magnetic eld between the cones and cylindrical bars. The next two menu items allow the user to displace or rotate the complete simulation, respectively. Although the user's position and orientation in the CAVE are known, thereby allowing the environment to be rendered in correct viewer-centered perspective, we found it advantageous to be able to use the wand to enable/disable additional translation and/or rotation of the magnet geometry. By using the wand for translation, one can push or pull the magnet and eld to a desired location for viewing without \walking into" one of the CAVE walls. Similarly, the wand allows for easy 360 degree rotation about the vertical axis. The fourth option allows the user to specify the number of half-periods of the EMW magnet to display. There are 18 full periods in the EMW array. However, since the eld is periodic, and displaying all 18 periods would overwhelm the user with data, we limit to four the maximum number of half-periods displayed. If the user chooses to display zero half-periods the magnetic eld is shown without the context of the magnet's geometry. The fth option toggles the display of the particle that traces the positron beam's trajectory. The beam trajectory and displayed eld can be changed by the sixth option, the magnitude of a scale factor for the current in the electromagnet. The scale factor simulates the increase in current in the electromagnet, leading to a horizontal eld of up to 1.0 T. This option intuitively demonstrates to the user the relationship between the electromagnet's eld strength and the (approximated) changes in orientation and magnitude of the resulting vector eld and beam trajectory. 5 Discussion We found that virtual-reality provides a new way to view 3-D electromagnetic eld calculations. In contrast to traditional plane-at-a-time or 2-D mappings of 3-D data, the user obtains a panoramic view of the eld. He or she may move freely about the virtual environment and explore the electromagnetic eld from many di erent angles. By changing viewpoint, one can easily overcome the e ect of obstructions to visualize the geometry and eld patterns. Compared with viewing the eld data externally, the CAVE allowed us to \step into the eld" and view the eld from the inside out. This view provided a strong sense of immersion and participation that increased our level of understanding of the eld generated by the EMW magnet. This intuitive understanding is often dicult to achieve through conventional scienti c visualization. An important advantage of the CAVE environment is that multiple users can simultaneously share the virtual experience. In our case, both the magnet designer and end user of the electromagnetic eld can observe the eld behavior and positron orbit as, for example, the electromagnet current varies. This mode of collaboration can allow a large part of the design and testing of an electromagnetic device to be done in a virtual environment before costly physical prototypes are constructed. Several possibilities for future enhancements exist. These include representing the magnetic 7 eld with ux lines or ux tubes, using cutting planes of arbitrary orientation to show eld variation, and varying the starting position and angle of the positron beam to explore the edge e ects felt as it enters the eld of the wiggler magnet. Acknowledgments We thank Roger Dejus for calculating the positron trajectory through the wiggler and making computer codes available to us. The work of the second author was supported by the Mathematical, Information, and Computational Sciences Division subprogram of the Oce of Computational and Technology Research, U.S. Department of Energy, under Contract W-31109-Eng-38. The work of the third author was supported by the Oce of Basic Energy Science, U.S. Department of Energy, under Contract W-31-109-Eng-38. References [1] G. Burdea and P. Coi et. Virtual Reality Technology. John Wiley & Sons, New York, 1994. [2] R. Craw s, N. Max, and B. Becker. Vector eld visualization. IEEE Computer Graphics and Applications, 14(5):50{56, 1994. [3] C. Cruz-Neira, D. Sandin, and T. DeFanti. Surround-screen projection-based virtual reality: The design and implementation of the CAVE. In ACM SIGGRAPH '93 Proceedings, pages 135{142. Lawrence Erlbaum Associates, 1993. [4] W. de Leeuw and J. van Wijk. A probe for local ow eld visualization. In IEEE Visualization '93 Conference Proceedings, pages 39{45, 1993. [5] G. Bishop et al. Research directions in virtual environments. Computer Graphics, 26(3):153{ 177, 1992. [6] R. Kalawsky. The Science of Virtual Reality and Virtual Environments. Addison-Wesley, New York, 1993. [7] L. Kettunen, K. Forsman, D. Levine, and W. Gropp. Volume integral equations in nonlinear 3-d magnetostatics. International Journal of Numerical Methods in Engineering, 38:2655{ 2675, 1995. [8] P. Montano, G. Knapp, G. Jennings, E. Gluskin, E. Traktenberg, I. Vasserman, P. Ivanov, D. Frachon, E. Moog, L. Turner, G. Shenoy, M. Bedzyk, M. Ramanathan, A. Beno, and P. Cowan. Elliptical multipole wiggler facility at the advanced photon source. Review of Scienti c Instruments, 66:1839{1841, 1995. [9] J. van Wijk. Rendering surface-particles. In IEEE Visualization '92 Conference Proceedings, pages 54{61, 1992. [10] Vector Fields Ltd., Oxford, U.K. TOSCA Reference Manual. [11] R. Wang and R. Madison. Interactive visualization and programming|a 3d vector eld visualization. IEEE Transactions on Magnetics, 29(2):1997{2000, 1993. 8