visualization of particle motion in magnetic fields · 2017-11-29 · visualization of particle...

8
Visualization of Particle Motion in Magnetic Fields Benjamin Maier * , Andriy Naumov ** , Maxim Maier particle target area in this area you can choose magnet wall / obstacle start area place magnets visualisation here magnetic field Figure 1: Playing field of our interactive magnetic field game. Particles started in the specified area (upper left with arrows) need to reach the target area (upper right, stars). They move in the direction dragged by users with the mouse. Their movement and velocity can be changed through magnets in the magnet area (bottom with dots). The areas and obstacles can be placed and sized freely through a script per level. Abstract—In this work we present and evaluate visualization methods for motion of charged particles in a magnetic field. Different approaches such as glyph-based, trajectory-based and path rating-based concepts are discussed and corresponding visualizations are introduced and implemented in an interactive game. The visualizations and the gamification approach are evaluated in a pilot study. Index Terms—Visualization of magnetic fields, Glyph-based techniques, User study, Motion of charged particles in a magnetic field. 1 I NTRODUCTION Explore a given magnetic field – a task, where visualization methods can be applied. One could also derive information about the magnetic field by watching the motion of charged particles that are affected by it. This paper exhibits an approach to compute and visualize the mo- tion of charged particles as well as to predict their further behaviour in a magnetic field. Therefore we present several visualizations and describe a level- based game that makes an interaction between a user and the moving particles possible. To succeed at the different levels, players need to understand and predict the motion of charged particles in a magnetic field with the help of our visualizations. The game was created to motivate people to take part in a study, where the usefulness of these visualizations can be evaluated. The results of this study are discussed in chapter 5. An essential part of the physics in our game is the magnetic field, which can be homogeneous or inhomogeneous, depending on user placed magnets. With all that interaction possible there is one thing * Benjamin Maier ** Andriy Naumov [email protected] [email protected] Maxim Maier [email protected] about the magnetic field, that remains constant: the angle in which the magnetic field lines enter the bottom plane, which is always perpendicular. Because of that it is not possible to draw magnetic field lines on the plane, as one could suggest when thinking about magnetic field visualization. When a positive charged particle with charge q moves in the magnetic field ~ B with velocity ~ v, a Lorentz force ~ F L = q ~ v × ~ B acts on the particle, that is orthogonal to both the magnetic field lines and the direction of motion, as Figure 2 shows. Other effects are neglected. Therefore the trajectory of a charged moving particle in a homogeneous magnetic field is a circular arc, regardless of the direction in which the particle starts to move. 2 RELATED WORK In this section we first discuss related work in the field of motion of charged particles in magnetic fields from the physical and numerical point of view (section 2.1). Since we designed a game we afterwards take a look at an educational game and a study that measures the effect of that game (section 2.2). Finally we discuss related work in the field of visualizations in general by taking a look at several related approaches (section 2.3). 1

Upload: others

Post on 12-Mar-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

Visualization of Particle Motion in Magnetic Fields

Benjamin Maier∗, Andriy Naumov∗∗, Maxim Maier‡

particle

target area

in this area you can

choose

magnet

wall / obstaclestart area

place magnets

visualisationhere

magneticfield

Figure 1: Playing field of our interactive magnetic field game. Particles started in the specified area (upper left with arrows)need to reach the target area (upper right, stars). They move in the direction dragged by users with the mouse. Their movementand velocity can be changed through magnets in the magnet area (bottom with dots). The areas and obstacles can be placedand sized freely through a script per level.

Abstract—In this work we present and evaluate visualization methods for motion of charged particles in a magnetic field.Different approaches such as glyph-based, trajectory-based and path rating-based concepts are discussed and correspondingvisualizations are introduced and implemented in an interactive game. The visualizations and the gamification approach areevaluated in a pilot study.

Index Terms—Visualization of magnetic fields, Glyph-based techniques, User study, Motion of charged particles in a magneticfield.

1 INTRODUCTION

Explore a given magnetic field – a task, where visualization methodscan be applied. One could also derive information about the magneticfield by watching the motion of charged particles that are affectedby it.

This paper exhibits an approach to compute and visualize the mo-tion of charged particles as well as to predict their further behaviourin a magnetic field.

Therefore we present several visualizations and describe a level-based game that makes an interaction between a user and the movingparticles possible. To succeed at the different levels, players need tounderstand and predict the motion of charged particles in a magneticfield with the help of our visualizations. The game was createdto motivate people to take part in a study, where the usefulness ofthese visualizations can be evaluated. The results of this study arediscussed in chapter 5.

An essential part of the physics in our game is the magnetic field,which can be homogeneous or inhomogeneous, depending on userplaced magnets. With all that interaction possible there is one thing

∗ Benjamin Maier ∗∗Andriy [email protected] [email protected]

‡Maxim [email protected]

about the magnetic field, that remains constant: the angle in whichthe magnetic field lines enter the bottom plane, which is alwaysperpendicular. Because of that it is not possible to draw magneticfield lines on the plane, as one could suggest when thinking aboutmagnetic field visualization.

When a positive charged particle with charge q moves in themagnetic field ~B with velocity~v, a Lorentz force

~FL = q~v×~B

acts on the particle, that is orthogonal to both the magnetic fieldlines and the direction of motion, as Figure 2 shows. Other effectsare neglected. Therefore the trajectory of a charged moving particlein a homogeneous magnetic field is a circular arc, regardless of thedirection in which the particle starts to move.

2 RELATED WORK

In this section we first discuss related work in the field of motion ofcharged particles in magnetic fields from the physical and numericalpoint of view (section 2.1). Since we designed a game we afterwardstake a look at an educational game and a study that measures theeffect of that game (section 2.2). Finally we discuss related workin the field of visualizations in general by taking a look at severalrelated approaches (section 2.3).

1

Page 2: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

~FL

~B~v

Figure 2: Lorentz force~FL acting on the moving negatively chargedparticle with velocity~v due to a magnetic field ~B

2.1 Motion of Charged Particles in Magnetic FieldsIn his Bachelor thesis, Patrick Daum [4] deals with the problem ofphysical description of the motion of charged particles in magneticfields. Although it is possible to describe the trajectory of a chargedparticle in an electromagnetic field by analyzing the Lorentz forceand the electrical force acting on a particle proportional to the ac-celeration of this particle [9], the variability of the acting forces canmake the equations that describe the motion very complex. ThereforeDaum describes how to solve such complex differential equationsbest with numerical methods. He uses such methods as the Runge-Kutta method of fourth order , the Runge-Kutta-Merson algorithmand the Adams-Bashforth-Moulton method In contrast to Daum’swork we do not go beyond the comparatively simple Eulers method[2], [5]. In Daum’s thesis, the visualization has exclusively support-ive role and does not get beyond the visualization of trajectories,whereas in our project the visualization of the motion of chargedparticles has central value.

In the frame of the study [11], that is concerned with interpreta-tion and scientific visualization of 3D vector fields a visualizationtechnique for the dynamics of vector fields was presented. Thistechnique, termed field line advection, was developed to visualizethe dynamics of one vector field under the influence of a secondvector field. Field line advection animates magnetic field lines ina velocity field. After illustrating this technique on two datasets ithas been found that the field line visualization tends to suffer badlyfrom visual cluttering. This problem can be avoided by interactivepicking the regions of interest. In contrast to the described studythe displaying of the field lines is not the main focus of our project.Magnetic field and the field lines have to be analyzed to draw ourvisualizations, yet the result of this analysis is not shown to the users.

2.2 Educational GameSupercharged! [8] is an electromagnetism simulation game thatwas developed to investigate the pedagogical potential of simulationgames. Players can pilot a spaceship by placing charged particlesand altering particles charge and explore electromagnetic mazes.The game play consists of two phases: planning and playing. Theplayer gets a limited set of charges that can be placed throughoutthe environment in planning phase; in playing phase player switchesthe charge (either positive, negative, neutral, or dipole) and moveseither toward or away from the charge, shaping the trajectory ofthe spaceship. The goal of Supercharged! is to help learners buildstronger intuitions for electromagnetic concepts. The goal of theinteractive game that was developed in our project is to facilitateunderstanding of the effects of magnetic fields on particles.

The learning effects that occurred by using Supercharged! ina school for underserved students were examined in a study thatincluded 96 students of 8th grade. The participants were subdividedinto experimental group (61 students) and control group (35 stu-dents). All students learned the same content: experimental groupplayed the game, while control group was taught through lectures,observations and experiments. The study states that students in theexperimental group performed better than students in the controlgroup on measures for understanding [12]. In contrast to Super-charged! we allow player interactions not only with particles (likeSupercharged!) but also with magnets and visualizations. Instead

of spaceship and the maze we used particles and special areas withobstacles. Our game cannot be strictly divided into clear separatedphases. Depending on game-level we combine or separate planningand playing phase.

2.3 Visualization ApproachesVisualization of pathlines is of great importance for the analysisof unsteady flow as pointed out by the study [7], that describesthe pathlines glyph - new approach, which combines aspects ofgeometric flow visualization [10] with glyph-based techniques [1].Pathline glyph was designed to avoid visual clutter that can be causedby the paths intersection. Pathline glyphs are decreased versions ofpathlines which are distributed over the non-overlapping cells intowhich the full domain was subdivided. Each cell represents the fulldomain and contains only one version of a pathline. Pathlines differin shape which allows to recognize patterns and this effect can beenhanced with colour mapping. Due to this effect it is possible todetect global trends and provide insight into time-dependent flowbehaviour. One of the visualization approaches (Mini Paths) that weused is based on Pathline glyph. Like pathline glyphs, Mini pathsvisualization represents a small version of the charged particlestrajectory and leads to a global picture.

Line Integral Convolution (LIC) is an approach that locally blursan input texture along the field lines of a given vector field [3]. OftenLIC is applied to depict vector fields in 2D or over a surface in 3D.Generating the 3D textures using LIC is possible, as in [6] where,methods for effective volume visualization of 3D fields are intro-duced. The study shows that the proposed methods can effectivelyreveal the directional structures of a vector field. As one of ourvisualizations we use animated version of LIC to depict the directionof particles in the magnetic field to help players choose a directionfor releasing particles. Moreover we combined our variant of LICwith another visualization, that uses colours to evaluate the qualityof the paths.

3 GAME SETUP

3.1 Description of the GameThe primary objective of the game is to get throughout the playingfield to the target area, avoiding obstacles like walls or magnets. Thegame is played by one player who controls the particle’s movingdirection and velocity by clicking and dragging the mouse. Aftera particle has been released, it moves its way without further inter-action possible by the player. The player is able to zoom in on theplaying field and can turn it. The playing field has a rectangularshape and consists of different areas (see Figure 1):

Start area is denoted by a field of black arrows. Particles can belaunched only from the start area(s).

Magnet area is denoted by black circles. Magnets can be placedonly in magnet area(s).

Target area is denoted by black stars. To reach the next level atleast one particle has to reach the aim area.

The wall is the border of the playing field and also can serve as anobstacle in the way of a particle. If a particle hits the wall it isabsorbed and disappears.

Right above the playing field there are visualization icons. Byclicking on these icons player can switch between ten visualizations(detailed description in Section 4). By hovering the mouse over anicon, the user can reveal a short description of the correspondingvisualization. To highlight the visualizations the scene darkens. Byselecting the ”None”-pictogram user can take a look at the scenewithout visualizations.

The game begins with tutorial-levels followed by actual levelsof the game. The degree of difficulty grows towards the end of thegame. Before start of every level a player is able to read a brief level

2

Page 3: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

Figure 3: ”Screwed” magnet, that cannot be moved or deleted by theplayer

introduction containing helpful information and sometimes hintshow to pass the level.

The player is able to launch as many particles as wanted. Theamount of attempts to accomplish the level as well as the time thatthe player needed are displayed in the upper right corner of the gamewindow. After 90 seconds player gets a possibility to skip the currentlevel by clicking the emergent button.

Specific information for each level like size of playing field, po-sitions of different areas, allowed amount and strength of magnets,maximum start speed, charge and mass of particles, allowed visual-izations was written in scripting language Lua. Thus the levels ofthe game can be designed with any prior knowledge about the mainprogram.

Most of the levels have a preset weak homogeneous magneticfield, which is called the earth’s magnetic field in the in-game expla-nation. In some levels the user also can place bar magnets or therealready exist some, which can be dragged around in the magnet areasby the player or can be turned upside down to change their polarity.Magnets can also be deleted by the player, unless they are ”screwed”on the playing field (those magnets are marked with a screw head,see Figure ??). Magnets can overlap, thus the effect of a magnet canbe neutralized by another magnet that is turned upside down and isplaced directly on the first magnet. In the upper right corner of thegame window there is a display with amount of magnets the user isstill able to place.

3.2 Magnetic field of a dipoleThe magnets have their magnetic poles at their top and bottom side.As mentioned above, the magnetic field lines are assumed to be allvertical in the plane. This is the result, when magnets are modelledas single magnetic dipoles, which is a good approximation, becausethe magnets have flat shape. The strength of the magnetic dipole fieldgenerated by a magnet at position x0 can be calculated as follows:

|B(x)|= µ0 |m|4π |x−x0|3

,

where µ0 = 4π ·10−7N A−2 is the vacuum permeability and |m| isthe strength of the magnetic dipole. So the magnetic field strengthdecreases with 1/d3, when one moves away from the magnet centreto a distance d.

3.3 Numerical Integration of the Equations of MotionTo calculate the trajectory of particles, an explicit Euler method isused. Starting with initial values for velocity and position, v0 und x0,the quantities for the next step are gradually calculated as follows:

xn+1 = xn +vn ·∆t,

v⊥ = (vy,−vx)> where (vx,vy)

> = vn,

vn+1 = vn +v⊥∣∣B(xn+1)

∣∣ · qm·∆t.

Every time the magnetic field changes, e.g. when the player placesa new magnet, the magnetic field is recalculated on rectangular

grid points. To get the strength of the magnetic field at a specifiedpoint x, as needed in the algorithm above, bilinear interpolationbetween neighbouring points is applied. This approach of alwayshaving a discretized magnetic field stored instead of evaluating themagnetic field where it is needed is advantageous here, as for somevisualizations the magnetic field needs to be evaluated at many pointsand repeatedly while the player adjusts the particle speed and startingdirection. Furthermore by using OpenCL there is no difference inperformance for this method.

3.4 Implementation Specific DetailsWe used C++ with OpenGL for the program to be platform indepen-dent. The visualization, particle trajectories and magnetic fields areonly recalculated, when a specific event occurs. Considered eventsare a change in user placed magnets, a new velocity or starting di-rection for the particle that is currently being started or the end ofa precalculated trajectory, either because of lack of data or becauseit intersects a wall or the target area. In case of such an event themagnetic field (if needed) and various data for the current activevisualization gets recalculated on GPU using OpenCL or on CPU ifOpenCL is not available. The data is then passed to OpenGL shadersto generate the visualization.

Particle trajectories for user started particles are calculated fullyon CPU and for 500 time steps in advance, because this is has nonoticeable negative effect on performance and so it does not interferewith calculation for visualizations that may still be occupying GPU’scomputational capacities. So at every frame only the right pointsneed to be read from memory and be interpolated and so the framerate is decoupled from the calculation time step.

4 VISUALIZATIONS

To help players in solving the levels we developed several visual-izations that provide information about motion of particles and themagnetic field.

positive negativezero

Figure 4: colour spectrum corresponding to strength of the magneticfield. A strength of zero corresponds to full transparency.

The magnetic field itself is always visualised by a simple heatmap approach. A positive magnetic field is indicated by red colourwhereas green colour means negative polarity. The darkness of thecolour depends to the strength of the magnetic field as depicted inFigure 4. Positions where the strength is about zero are transparent.This is the case nearly everywhere, except near magnets. It can beseen in Figure 6(h), where the magnetic field is visible only aroundthe two magnets.

In addition to this magnetic field visualization the player canprofit from another visualization type that is more related to theparticle motion and should help the player in succeeding at thecurrent level. These visualizations we developed can be classified infour categories:

• glyphs: star glyph, wheel glyph, colour circle glyph

• trajectories: randomly seeded, near magnets

• heuristic path evaluations: starting direction, distance to target,LIC, minipaths

• historical: Trace.

Except for Trace, this type of visualization is permanentlyrefreshed while the player drags the mouse to adjust particlespeed and direction. So the player can predict the effect ofhis currently adjusted speed and direction and this can lead

3

Page 4: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

him to good adjustment without having to start the particlemultiple times. In contrast this concept of improving by tryingdifferent start directions or velocities is implemented by Tracevisualization.

4.1 Glyph Based Visualizations

The idea of glyph-based visualizations is that at rectangular gridpoints information about the local magnetic field and its influenceon moving particles is collected and presented in a glyph. Relevantinformation is how a particle will behave, when it passes the neigh-bourhood of a glyph. Will it be deflected to the right or to the leftand how much?

4.1.1 Star Glyph

This glyph presents information about deflection directly by showingpossible paths of moving particles, i.e. trajectories. It looks like a star.In variant 1 (see Figure 6(a)) it consists of four short trajectories, thatpass the centre point in different angles. Where the magnetic field’sstrength is big enough in the neighbourhood, the trajectories aredeformed and give players a hint about possible behaviour of passingparticles. What can hardly be recognized, is the polarity of themagnetic field, which influences whether trajectories are deflected tothe left or to the right. This is because the orientation of the trajectorycannot be derived from the glyph, i.e. one does not know in whichdirection the particle needs to move to generate a trajectory.

Because this glyph is very small, it is be repeated many of timesall over the field giving a fine resolution of the presented effects.The opposite approach is to have only a few glyphs which then canbe bigger and possibly better read. We also created a glyph for thisapproach shown in Figure 6(b), where we have more trajectories perglyph that are all longer.

4.1.2 Wheel Glyph

The wheel glyph is similar to the star glyph, in that it consists oftrajectories through its centre (see Figure 6(c)). These trajecto-ries represent the behaviour of a charged particle assuming it waslaunched in the centre of the polygon—contrary to the star glyph,where particles start at the edge of the glyph.

4.1.3 Colour Circle Glyph

. The Colour Circle Glyph consists of two circles which are colouredby a continuous colour spectrum. The outer and inner circle is forentering and leaving particles, respectively. Particles move in thedirection of that colour in the inner ring through which they enteredin the outer ring. For example, a particle entering in the blue areaon the outer ring will leave in the direction marked blue in the innercircle.

If there is no magnetic field at all, a particle will pass the glyphwithout any change in direction. So for that case the colours in theouter ring are at opposite positions to the colours in the inner circle,as seen in the glyph in the top left corner of Figure 6(d). Whilethe player adjusts the speed of the next particle he wants to start,the inner circle of the glyphs move so that it represents the correctleaving directions for incoming particles.

So for extracting information from the glyph the player has tolook for positions in the two circles with matching colours. Anotherapproach would be to recognize the overall twisting of the innercircle respective to the outer one. This could be easier when thenumber of different colours is minimized. For this purpose weimplemented a variant of this glyph which has only the coloursyellow and red, as shown in Figure 6(e).

4.2 Trajectory Based Visualizations

Providing a trajectory, i.e. a path of a test particle, can be a way ofgiving global information about particle motion, when the trajectorylength is not limited to the size of a small glyph as it was the casefor Star Glyph and Wheel Glyph.

For the trajectory-based visualizations discussed here seed pointsneed to be generated which then serve as starting point for the calcu-lation of a trajectory. Each trajectory is computed forwards and aswell backwards by applying a negative time step width. The start-ing direction is the same as that of the recently started or currentlystarting particle.

4.2.1 Random TrajectoriesThe position of a seed point is crucial for the usefulness of thecorresponding trajectory. For the Random Trajectories nine seedpoints are randomly created and a tenth seed point is set to the currentstart position of the particle because this is surely a desired startingpoint. By having additional randomly chosen points, some of thetrajectories will be useful while others will not

These trajectories have a length of 160 time steps each. They aredepicted in Figure 6(f).

4.2.2 Magnet TrajectoriesAnother placement of seed points is done for Magnet Trajectories.Here for every magnet on the playing field four trajectories are setleft, right, above and underneath the magnet. This is done becauseit is in areas where magnets are placed that the deformation oftrajectories is biggest and least predictable for players.

4.3 Path-Rating-Based Visualizations

0% 100%50%

Figure 5: Colour mapping for Starting Direction Glyph, Distance toTarget and LIC visualization

Trajectory-based approaches only show trajectories starting atsome points and require players to guess how to start a particle sothat it eventually reaches a trajectory and follow it from there on.Building on that we derived path-rating-based visualizations whichevaluate trajectories and show that rating as an indicator for theparticle motion.

4.3.1 Starting Direction GlyphThe goal in our game is to start particles with a specific directionand velocity so they reach the target area. To that end, the startingdirection glyph is drawn at the position where the particle started. Itis a filled circle where colours denote a hint how good the currentlystarting particle will perform, regarding the achieved distance to atarget area.

The colour is either blue or it is in a range from green over yellowto red as depicted in Figure 5. A blue beam indicates, that a particlestarted with the currently adjusted velocity in this direction will reachthe target area. The other colours provide a rating, how close theparticle will come to the target area. The minimum distance betweenthe particle on its way and points on the border of a target area iscomputed. The value is normalized so that a distance spanning adiagonal of the playing field corresponds to 100% and then wouldbecome red and the 0%, which would be green corresponds to adistance slightly above zero.

In Figure 6(h) the setting of a exemplary level is shown. Thestarting area is in the centre whereas the target areas are the squarespositioned at the corners. Four obstacles exist and also two magnetsare placed. If the player begins to start the particle, he gets the glyphshown in Figure 6(i). It contains two bigger and two very thin bluebeams. That indicates, that the best way to complete this level isto aim at the magnet at the top central position. Or the player canaim north-west to reach the target directly. Two other chances areusing the magnet on the left and trying the path directly south-west.

4

Page 5: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

Figure 6(i) also shows, how the yellow and green colours correspondto directions that are not that good (yellow) or slightly better but notperfect (green).

4.3.2 Distance to TargetThe Distance to Target visualization develops the idea of StartingDirection further. Here we divide the playing field by a grid whosecells get a constant colour each.

It is the best colour, that the Starting Direction glyph would havethere. That means, if there is a possible path from a point to a targetarea, the cell containing this point gets the colour blue. If the StartingDirection glyph would be for example all red with a small orangebeam, the position is coloured orange. In the playing field good pathsending at the target areas are recognizable by a blue path, whereasby obstacles shaded areas are coloured red. To keep interactivity inour implementation we use a sampling of 70×50 points.

In the level shown in Figure 6(j) the player has to find the one ofthe eight possible paths, that leads them from the starting area at thetop to the target area at the bottom. The other paths are not passablebecause of strong magnets. The visualizations show the second pathbeing quite good, but being interrupted at half way because of amagnet in the middle. So an additional magnet has to be placed thereto neutralize the existing magnet. After having done that, the way iscleared and therefore coloured totally blue.

4.3.3 LIC VisualizationAnother step combining the advantages of Starting Direction andDistance to Target is made by the LIC visualization. This aims at alsomaking the direction information of Starting Direction accessible.The colouring is the same as already provided by Distance to Target.The direction of the LIC at a specific point is the direction in whichone would need to start the particle to achieve the best result, thatmeans the trajectory that comes closest to a target area. Because theLIC is animated, it may provide an easy understanding of what isgoing on at the current level.

The level depicted in Figures 6(k) and 6(l) contains some obstaclesand an area, where magnets can be placed. At first glance andwithout visualizations, one could assume, that placement of magnetsis needed in order to pass between the obstacles. With the Distanceto Target visualization in 6(k) or the LIC visualization in Figure6(l) it is more clear, that there are possibilities to solve it withoutplacing any magnets because there are blue areas inside the startingarea. With the LIC in contrast to Distance to Target we also know,in which direction the particle needs to be started.

Like with Distance to Target visualization we sample the fieldat grid points, resulting in small rectangles of the same colour. Weexperienced good interactivity with 40× 40 grid points where 30trajectories each are started to compute the best direction.

4.3.4 Mini PathFinally Mini Path visualization (see Figure 6(m)) is an approachsimilar to Pathline Glyphs [7] where down-scaled trajectories areembedded in a grid. Each “mini path” is a small version of atrajectory that would start at this points in the start direction of theparticle currently adjusted by the player.

The colour of each trajectory follows a spectrum, as depicted inthe enlarged view in Figure 6(m). Every trajectory is only trackeduntil it leaves the playing field or hits an obstacle. So there are longerand shorter trajectories. The longest occurring mini path uses allspectrum colours, shorter trajectories therefore do not contain all thecolours. It follows an overall impression, where some structures arevisible. It is however not clear, how to interpret them to find a pathto the target areas. By zooming in at the individual paths the playercan get some information about how the particle would behave, if itwere started at that point.

4.4 TraceThe goal of the Trace visualization is to let the player gain experienceand improve their attempts time after time. Therefore this visualiza-

tion shows the tracks of previous particles (see Figure 6(n)). Tracediffers from the other visualizations. Unlike the other visualizations,this one does not change while the player adjusts velocity and startdirection. Furthermore there is nothing to display at start. As theplayers launches a particle the first trace is drawn along the particlesway.

To avoid an overflow with traces it was found helpful to only showthe traces of the last seven particles.

5 USER STUDY

5.1 SetupTo evaluate the usefulness of the different visualizations, a user studywas conducted. This was done by distributing the game to the partici-pants, so that they could play it on their personal computer. Thereforethe program was made available for download. When the game isstarted, the user is asked, whether playing information may be sub-mitted automatically to a server and if not, the user has the choiceto manually send a result txt-file per e-mail instead. The submittedinformation includes the full replay of the whole gaming process,so that all relevant information such as level completion times ornumber of tries can be extracted during evaluation and exceptionalscores or user behaviour dealing with a specific visualization typecan be understood later by watching the replay.

The game was distributed in five different versions that differin the visualizations available in-game. The first eight levels arecommon between all versions and provide a tutorial to functionalitiesand understanding of game-play needed to succeed at the followinglevels. Then there are two times five levels which have to be playedwith a preset visualization type for each set of five levels. So everyuser evaluates two different visualizations, resulting in a total of fiveparticipants needed to test the full set of our ten visualizations. It wasdesigned like this as a compromise between on the one hand givingthe visualizations to people that do not have previous knowledgefrom visualizations earlier used and on the other hand not havingprospect of finding many participants for the study.

To consider the results of the evaluation more particularly we de-veloped the replay function. Replays can be helpful while analyzingthe user behaviour and is very well suited to detect the reason ofextreme outliers. For example with help of the replays we couldanalyze whether the players paid attention in tutorial levels.

After the player has finished the game, he is advised to fill in aquestionnaire, which opens in the browser. There, statistical infor-mation such as gender and age and more specific information aboutthe game and understanding of the used visualizations is asked for.These data is internally linked to the replay of this person, that mighthave been just uploaded to the server by the program.

5.2 EvaluationThe participants for the pilot study were students and employees ofthe visualization institute of University of Stuttgart. The game wasplayed 60 times and the study brought us 12 records on average foreach visualization type. Those records are not well distributed overthe visualizations so that four visualizations had four to six playerseach, while others have more than 20. The questionnaires were filledin 12 times in total but often incomplete. In Figure 7 the averagednumber of tries needed to complete a level is shown in a box plot forthe different visualizations. In Figure 8 the respective completiontime is shown. Both plots show, that there exist outliers, which aresome participants that needed much more tries and more time tocomplete the levels than the majority. Also relative differences be-tween the visualizations can be seen. For example Starting Directionand Distance to Target are among the best visualizations regarding asmall completion time and low number of tries.

5

Page 6: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

(a) Star Glyph in Variant 1 (b) Star Glyph in Variant 2 (c) Wheel Glyph

(d) Colour Circle Glyph, Variant 1 (e) Colour Circle Glyph, Variant2

(f) Random Trajectories (g) Trajectories near Magnets

(h) Level setting for explaining Starting DirectionGlyph

(i) Level with Starting Direction Glyph (j) Level with Distance To Target visualization

(k) Level with Distance to Target visualization (l) Level with LIC visualization

(m) Mini Paths visualization (n) Trace

Figure 6: Visualizations to support the prediction of the motion of charged particles in a magnetic field. (a) to (e): glyph-based, (f) and (g):trajectory-based, (h) to (m): path-rating-based visualizations, (n): trace visualization.

In Figure 9 the averaged answers to the questionnaire are shown.

6

Page 7: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

Figure 7: Result of user study: Number of particles started until onehit the target area, averaged per level.

Figure 8: Result of user study: Time until a particle hit the targetarea, averaged over all played levels.

The participants who answered the questionnaire think the numberof main levels, where the visualization are tested, is appropriatewhile the number of tutorial levels is slightly too high. That theprogram communicates the replays to a server is considered notvery critical. We note, that none of the participants who disabledthe automatic record submit decided to send the results file per e-mail. According to the questionnaire, the game also is a bit fun, theusability is all right and the information page shown before eachlevel is helpful. The installation is considered to be very easy, whichis comprehensible since the participants simply had to download andexecute a single binary.

Conducting a user study can be done in different ways. For ourselected approach, as mentioned above, the questionnaire was notfilled in by most of the participants as we hoped. Some people alsoreported, that the game would not work on their local machine orwould be unplayable because of an obviously incorrect computedmagnetic field. This are disadvantages of the selected method ofconducting the study at the participants’ home or workplace. Instead,the participants could have been invited to a given place where theywould play the game and fill in a questionnaire afterwards. Thatwould have required less work on the data collection mechanismsand would have probably given more reliable data. But we think,that we then would have had less volunteers and less records afterall.

Figure 9: Result of user study: Answers to some questions of thequestionnaire

6 DISCUSSION

Considering the number of participants of our pilot study the re-sults are not representative but give a hint to the qualities of eachvisualization. Also, the study cannot explain, why a specific visu-alization performs as it does, because we did not receive enoughuser feedback concerning the visualizations. In the following weprovide a subjective evaluation of the visualizations based on ourown experiences that mainly matches and explains the tendenciesseen in the user study.

The glyph-based visualizations are only helpful if the magneticfield is strong enough in the neighbourhood, so that a visible defor-mation of the glyph is the result. In most levels this is only true forglyphs that are positioned directly in the centre of a magnet. But asthe magnetic field strength decreases with 1/d3 at distance d to amagnet, most of the glyphs are not distinguishable from their initialshape, when having no magnetic field. Among the glyphs this effectis most noticeable for the Star Glyph.

Therefore we created second variant of this glyph, which is largerand consists of more trajectories. Indeed, this glyph feels morehelpful, if one of its trajectories is positioned in a way, that resemblesthe path the particle could take to reach the target. But then theconcept of glyphs is misused, because we only can have a smallnumber of them and not their overall impression is giving the relevantinformation but a detail, namely one of its trajectories. For thisconcept we have pure trajectories.

The Colour Circle glyph in the more colourful variant 1 is hardto read. One has to choose a colour from the outer circle and findthe exact same colour in the inner circle. This is hard to do becauseof the continuous colour spectrum and needs some time. This isreduced in the second variant where only two colours are present.

Theoretically the user could extract information out of a ColourCircle glyph for particles coming from every direction. Practicallyone would be interested in only the direction the particle is reallythought to come from. So much of the information this type of glyphprovides is irrelevant.

The two trajectory-based visualization Random Trajectory andMagnet Trajectory give a direct indication, how the particle is goingto move. Because in most levels the successful path to the target areaclosely passes at least one magnet, the placement of the seed pointsfor the trajectory near every magnet, as with Magnet Trajectory isvaluable.

The perfect help would be a trajectory, that starts at the placefrom where the next particle is going to be started and goes all the

7

Page 8: Visualization of Particle Motion in Magnetic Fields · 2017-11-29 · Visualization of Particle Motion in Magnetic Fields Benjamin Maier, Andriy Naumov , Maxim Maier‡ particle target

way along the path this particle is going to travel. But then the gamewould be useless as everyone could solve every level at first try,which does not fit our goal to create magnet field exploration game.Providing not this whole trajectory but only the beginning of it is,what is done by Random Trajectory. This is still helpful because theplayer gets a precise idea how the particle will start and probablywhere it will encounter the first magnet. For the further path theother shown trajectories starting at random points can help.

To complete a level successfully players have both to create apath to the target by placing magnets and finally start the particlewith right speed in the right direction. For the latter task the playercan get support from path-rating-based visualizations, which aredesigned for this purpose. At first the Starting Direction glyph doesexactly this - providing information in which direction and withwhich velocity one should start. According to the user study, thisvisualization is among the most useful. This is also what the userstudy says.

The Distance to Target visualization lacks the information aboutthe direction and is therefore not quite as good. The LIC, again,gives a good support in solving the levels, because it holds bothoptimal starting point and directional information. Its drawback is,that it is computationally expensive and therefore cannot have sucha fine resolution as for example Starting Direction has with regardto resolution of direction.

The overall impression of Mini Paths visualization is not veryhelpful because it is not clear how to get information from it. Butit can be used by zooming in and interpreting the individual smallpaths at the grid points. However we would not rate this visualizationas good for this application.

Finally the Trace visualization is a good approach to let the playersucceed by trial and error. We think, it is easy to understand and doesnot need a long interpretation. Furthermore it is the one that needsthe least computational effort because it uses the particle trajectorieswhich need to be calculated anyway.

7 CONCLUSION AND FUTURE WORK

In this paper we presented an interactive game where players startcharged particles that need to reach a target area. The motion of theparticles can be influenced by magnets that are static or placed byplayers. We developed several visualizations to support players indetermining the direction and velocity of the particles so they reachthe target area and evaluated these in a pilot study. For future workthe most promising visualizations should be evaluated in more detailin a controlled study.

REFERENCES

[1] R. Borgo, J. Kehrer, D. H. Chung, E. Maguire, R. S. Laramee,H. Hauser, M. Ward, and M. Chen. Glyph-based visualization: Foun-dations, design guidelines, techniques and applications. EurographicsState of the Art Reports, pages 39–63, 2013.

[2] J. C. Butcher. Numerical methods for ordinary differential equations.John Wiley & Sons, 2008.

[3] B. Cabral and L. C. Leedom. Imaging vector fields using line integralconvolution. In Proceedings of the 20th annual conference on Computergraphics and interactive techniques, pages 263–270. ACM, 1993.

[4] P. Daum. Visualisierung der Bewegung geladener Teilchen in elek-tromagnetischen Feldern. Bachelor Thesis, Universitat Osnabruck,2004.

[5] E. Hairer, C. Lubich, and G. Wanner. Geometric numerical integration:structure-preserving algorithms for ordinary differential equations,volume 31. Springer, 2006.

[6] A. Helgeland and O. Andreassen. Visualization of vector fields usingseed LIC and volume rendering. IEEE Transactions on Visualizationand Computer Graphics, 10(6):673–682, 2004.

[7] M. Hlawatsch, F. Sadlo, H. Jang, and D. Weiskopf. Pathline glyphs.Computer Graphics Forum, 33(2):497–506, 2014.

[8] H. Jenkins, K. Squire, and P. Tan. Dont bring that game to school:Designing supercharged! to appear in laurel, b.(ed.) design research,2004.

[9] L. Lawrence and A. Morningstar. Newtons laws of motion. 2014.

[10] T. McLoughlin, R. S. Laramee, R. Peikert, F. H. Post, and M. Chen.Over two decades of integration-based, geometric flow visualization.In Computer Graphics Forum, volume 29, pages 1807–1829. WileyOnline Library, 2010.

[11] P. Mininni, E. Lee, A. Norton, and J. Clyne. Flow visualization and fieldline advection in computational fluid dynamics: application to magneticfields and turbulent flows. New Journal of Physics, 10(12):125007,2008.

[12] K. Squire, M. Barnett, J. M. Grant, and T. Higginbotham. Electromag-netism supercharged!: Learning physics with digital simulation games.In Proceedings of the 6th international conference on Learning sci-ences, pages 513–520. International Society of the Learning Sciences,2004.

8