Visualizing Virtual Vector Fields
Year: 2022 Authors: Othman Alrawi; Brian Day; Sabetta Matsumoto
Core claim
Real-time, interactive VR visualizations of vector fields, field lines, test particles, and isosurfaces can make vector calculus concepts more intuitive for learners.
Topics
virtual reality learning, vector calculus visualization, interactive physics simulation, gamified STEM education
Domains
vector fields, gradient, divergence, curl, scalar fields, isosurfaces, virtual reality, interaction design, computer graphics, educational visualization
Methods
Unity Game Engine, Marching Cubes algorithm, real-time visualization, semi-implicit Euler integrator
Media
VR sandbox, 3D arrow meshes, field lines, test particles
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Bridges 2022 Conference Proceedings
Visualizing Virtual Vector Fields
Othman Alrawi , Brian Day , and Sabetta Matsumoto
School of Physics, Georgia Institute of Technology, Atlanta, Georgia, USA; oalrawi6@gatech.edu; bday7@gatech.edu; sabetta@gatech.edu;
Abstract
We present our current progress on a virtual reality sandbox experience equipped with a toolset to create interactive vector fields and vector calculus operations. The aim of the project is to empower the student’s understanding of vector field and assist in the development of their intuition. The source code for this project is open-source and available at https://github.com/OthmanAlrawi/Visualizing-Vector-Fields.
Introduction
Figure 1: Demonstration of the electric field module.
The mathematics taught in classrooms is very often presented under a veil of abstraction. One such concept – the vector field – requires a high degree of visualization that cannot be provided by two-dimensional blackboards and static images in a textbook. We used the Unity Game Engine to create a series of real-time visualizations of vector fields and vector calculus in implemented in virtual reality (VR). Our objective is to develop a fun and interactive user experience that not only assists students in developing mathematical intuition but also uses modern video game techniques to incentivize learning goals. To construct this “gamified” experience, our simulation employs two key features of game development: real-time and interactivity.
Spatial thinking is a critical skill from vector calculus that is used in many fields, including physics, engineering and chemistry as concepts move from 2D representations to fully 3D systems [7]. Recently, there has been a push in STEM education towards both inquiry based learning models, often using digital “textbooks” with animations and other dynamic graphics. See, eg [8]. However, using interactive media is an additional tool that can empower the students to manipulate concepts graphically to build intuition for mathematical and phys
ical phenomena. Embodied cognition is one way of building a language for students to both describe and explain spatial concepts [10]. Virtual and augmented reality (VR and AR, respectively) promise to revolutionize learning [11, 9, 6]. Not only do they provide a platform for individualized, embodied learning, but they can help build students agency which in turn can give students a sense of ownership over their
Alrawi, Day, and Matsumoto
coursework, as demonstrated in Figure 1. This level of interactivity is frequently lost in large or online-based courses. “Visualizing Virtual Vector Fields” is an open-source VR sandbox that can be used in conjunction with formal classes or as a stand-alone learning tool to help students develop intuition about vector fields, scalar fields and vector derivatives.
3.3 Vector Fields
A vector field assigns a vector to each point in a subset of a space. A vector element, specifically a euclidean vector, is a geometrical object that has both a magnitude and direction. Typically, vectors are graphically represented by arrows that connect two points. This representation captures both key aspects of a vector perfectly. For this reason vector fields are usually drawn as a collection of arrows at discretized points in space. While books are limited to two dimensional projections, we are free from those restrictions. In Figure 2, we illustrate the electric field associated with a charged particle at position ,
(1)
where is a constant and is the charge of the particle. Users can place and move charges around the playspace and the field visualization updates in realtime.
(a) negative charge
(b) positive charge
Figure 2: The electric field generated by a point charge.
3.4 Field Lines and Dynamic Interactivity
The depiction of a vector field as a grid of arrows can be misleading to students as it presents them as discrete, rather than continuous objects. We augmented our simulations with a few methods to illustrate the continuity. Field lines are one dimensional curves that are tangential to the field along all of its points. For a vector field , a field line parameterized by must satisfy
(2)
where is the arclength parameter. In Figure 3 and Supplementary Video 1 [2], we illustrate the field lines for a configuration of point charges, whose electric field is given by a superposition of the fields of an individual particle.
(a) a negative charge (blue) and a positive charge (red)
(b) arbitrary configuration of charge
Figure 3: Fields lines of vector fields coming from two different charge distributions.
Visualizing Virtual Vector Fields
Figure 4: Interactive test particles.
Drawing the electric field lines frees us from the restrictions imposed by a 3D arrow mesh that portrays the field at discretized points, giving us the ability to express fields in a more continuous manner. Along these lines, the vector field is no longer represented by a set of local vectors with a direction and a magnitude. At each point along the curve, the tangent to the curve gives the direction of the vector field. We use color to quantify the magnitude of the field. The color gradient is created by linearly interpolating between two colors based on the maximum and minimum values of the field. Ultimately, we find a combination of both illustrations provides more intuition.
To make the visualization more interactive we introduce “test particles” that flow along the vector field. These are interactive game objects that undergo forces according to the direction of the fields in real-time, as seen in Figure 4 and Supplementary Video 2 [3]. These test particles are simulated using Unity’s 3D physics that implements Nvidia’s PhysX Engine, which uses a semi-implicit Euler integrator [1]. Since we are not trying to find exact numerical solutions but rather are mainly concerned with the general qualitative behavior, we believe the accuracy lost by using a fast integrator designed for video games doesn’t come at the cost of user experience.
Vector Derivatives
(a) ring distribution
Figure 5: Isosurfaces.
(b) a pair of charges
Vector calculus requires that we not only perform operations such as addition or multiplication on a vector field, but we also need to take derivatives of it. In , the three elementary differential operators are:
-
Gradient: For the scalar field , the gradient is a vector field that measures the direction and rate of change of .
-
Divergence: For the vector field , the divergence is a scalar field that measures the source of at every point.
-
Curl: For the vector field , the curl is a vector field that measures the rotation of in a given direction.
To illustrate these operators, we need to visualize scalar fields as well as vector fields. Given a scalar field , we plot its isosurfaces. These are surfaces in where is constant. We use the Marching Cubes algorithm to construct such surfaces. This is a computer graphics algorithm that is used to construct meshes of an isosurface from a three dimensional scalar field [5]. In order to update these surfaces in real-time, as shown in Supplementary Video 3 [4], we use a multi-threaded implementation of the Marching Cubes algorithm. In Figure 5, the we plot the isosurfaces for two electric potentials , where .
Conclusion & Future Work
We plan to incorporate more activities into the vector derivatives module aimed at increasing student intuition of vector derivatives. For example, we can evolve surfaces in according to the gradient of a scalar field. Additionally, we would like to marry students’ mathematical intuition with physical concepts. The curl shows up prominently in magnetostatics as well as in vortices formed in inertial fluids. In the future, we will present several of these to students in courses on multivariable calculus and introductory electomagnetism to explore the efficacy of “Visualizing Virtual Vector Fields” as a learning tool.
References
- [1] NVIDIA PhysX SDK 4.0 Documentation. https://gameworksdocs.nvidia.com/PhysX/4.0/documentation/PhysXGuide/Index.html. Accessed: 2022-02-26.
- [2] Othman Alrawi, Brian Day, and Sabetta Matsumoto. Supplementary video 1: Field lines. https://youtu.be/9WkTYzjxRQk, 2022.
- [3] Othman Alrawi, Brian Day, and Sabetta Matsumoto. Supplementary video 2: Test particles. https://youtu.be/jhgpkDt0GVY, 2022.
- [4] Othman Alrawi, Brian Day, and Sabetta Matsumoto. Supplementary video 3: Isosurfaces. https://youtu.be/d2Uvog1pqsE, 2022.
- [5] Michael Bartsch, Thomas Weiland, and Martin Witting. Generation of 3D Isosurfaces by Means of the Marching Cube Algorithm. IEEE Transactions on Magnetics, 32:1469–1472, May 1996.
- [6] Laurens Bollen, Paul van Kampen, and Mieke De Cock. Students’ difficulties with vector calculus in electrodynamics. Physical Review Special Topics - Physics Education Research, 11(2):020129, November 2015.
- [7] Elias Euler, Elmer Rådahl, and Bor Gregorcic. Embodiment in physics learning: A social-semiotic look. Physical Review Physics Education Research, 15(1):010134, May 2019.
- [8] Robert Ghrist. Calculus BLUE Multivariable Volume 4: Fields. Agenbyte Press, https://www2.math.upenn.edu/~ghrist/BLUE.html, 2018.
- [9] Mina C Johnson-Glenberg and Colleen Megowan-Romanowicz. Embodied science and mixed reality: How gesture and motion capture affect physics education. Cognitive Research: Principles and Implications, 2(1):24, December 2017.
- [10] Kangdon Lee. Augmented Reality in Education and Training. TechTrends, 56(2):13–21, February 2012.
- [11] Robb Lindgren, Michael Tscholl, Shuai Wang, and Emily Johnson. Enhancing learning and engagement through embodied interaction within a mixed reality simulation. Computers & Education, 95:174–187, April 2016.