Visualizing 2D Flows with Animated Plots

Bruno Jobard1, Nicolas Ray2 and Dmitry Sokolov3

1 LIUPPA laboratory, University of Pau, France, [email protected] 2 ALICE Team, INRIA Nancy Grand-Est, France, [email protected] 3 University of Lorraine, France, [email protected]

Figure 1: Ocean currents visualized with a set of dynamic arrows. (Left) The domain is filled with arrows aligned with the flow. The length is proportional to the velocity magnitude. The arrow density is controlled by a custom map to better capture local turbulences. (Right) Close-up showing the arrow trajectories and the morphing of their glyphs.

Abstract morphing arrow glyphs to semi-transparent discs. To sub- stantiate our method, we provide results for synthetic and Flow fields are often represented by a set of static ar- real velocity field datasets. rows to illustrate scientific vulgarization, documentary

arXiv:1205.5204v1 [cs.GR] 23 May 2012 film, meteorology, etc. This simple schematic represen- tion lets an observer intuitively interpret the main proper- Introduction ties of a flow: its orientation and velocity magnitude. We propose to generate dynamic versions of such representa- Arrow plots are standard static representations for 2D vec- tions for 2D unsteady flow fields. Our algorithm smoothly tor fields. They are intuitive and thus often used to present animates arrows along the flow while controlling their flows mixed with a contextual background image to non- density in the domain over time. Several strategies have expert public. The goal of this work is to provide a simple been combined to lower the unavoidable popping artifacts algorithm that produces clean animated arrow plots for arising when arrows appear and disappear and to achieve presentation purpose. visually pleasing animations. Disturbing arrow rotations This aim greatly differs from the traditional objective in low velocity regions are also handled by continuously as evidenced by the most recent 2D vector field visual-

1 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots ization techniques, where the efforts have focused on the • an efficient algorithm that controls the density of ar- interactive exploration of the data. For the purpose of ex- rows and manages their life span while maintaining ploration, image-based techniques such as flow textures low popping artifacts, (LIC and its animated extensions) allow for interactive visualization of flow details by using every pixels of the • a rendering algorithm that further reduces popping display device to communicate dense information. How- by both fading arrows in and out, and a morphing ever, flow textures present two major drawbacks in our strategy that handles transitions between high and context: blending them with an additional color map (a low velocity regions, background image or a dynamic field) might greatly dete- • and experimentations on both real and synthetic riorate its details, and such representations are quite sen- flows to evaluate how much the (unavoidable) pop- sitive to the quality of the display device and cannot be ping artifacts can be maintained acceptable for visu- controlled while broadcasting videos or during a public alization purposes. presentation. For the purpose of presentation, a sparse set of moving arrows can easily convey the desired informa- The rest of the paper is organized as follows: after re- tion. The arrows do not deteriorate the background infor- viewing the state of the art, our arrow representation is mation (only occlude it temporary), and is robust to low introduced (Section 1), the arrow generation algorithm is quality display device. provided (Section 2), the capacity to adapt the arrow den- This work proposes a method producing sparse and sity to any density field is explained (Section 3), the ren- smoothly animated representations of a flow with moving dering method is presented (Section 4), and results are arrows (Figure 1). We list below the general properties presented (Section 5) and discussed (Section 6). and constraints such an algorithm should satisfy. Arrow trajectories: to intuitively convey its dynamic nature, the arrow trajectories should follow the flow. Related work Local flow depiction: the arrow shape should depict the local orientation and velocity magnitude of the flow at Most of the recent work on visualizing 2D vector field any time. have targeted the ability for scientists to interactively ex- Uniform domain coverage: the representation should plore their flow datasets. This task is very efficiently provide an uncluttered information of the flow every- achieved with texture-based techniques [9] which offer a where in the domain at any time. dense representation of the fine details of a vector field. Smooth animations: the arrow movement should be They are inexpensive to compute and can produce smooth as smooth as possible to avoid distraction. animations of unsteady flows. However, when combined We propose an algorithm that generates intuitive arrow with a background image, these texture-based represen- plot animations by advecting and bending arrows over tations sometimes fail in displaying both the fine details time while guaranteeing that arrows will not occlude each of the flow and the background (see Section 6.3 and Fig- other and ensuring a complete coverage of the domain. ure 11). In the context of presenting flow behavior in Moreover, the method is able to adapt the density of ar- an animated way to non-expert public, simpler and more rows to arbitrary density field. schematic alternatives are more attractive. However, keeping a uniform coverage of the domain Numerous such geometric based flow visualization with no occlusion involves inserting new arrows to fill the methods were invented over the two last decades [12]. We empty places and removing some arrows in places that focus below on the techniques closely related to visualiza- get too crowded. This necessary insertion and deletion tion of a flow field by animated geometric primitives. of arrows introduce strong popping artifacts when they Vector plots: The simplest vector field visualization appear and disappear, deteriorates the smoothness of the method consists in drawing straight segments originat- animation. Our algorithm has been designed to minimize ing from the nodes of an underlying mesh [2] (Possibly it, both when generating arrows and at rendering time. a Cartesien grid) to indicate the local flow direction and The main contributions in this paper are : possibly its orientation by placing an arrow tip at its other

2 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots end. Its magnitude might be conveyed by the segment diffusion to better represent the flow. It is even possible length. The main drawback comes from the origin of ar- to represent particules with arrows that are advected by rows being unable to change over time, leading to occlu- the flow [19]. However, arrows will suffer shearing and sions [8] and confusing animations when the vector field could only be used when the support is given by a pathlet is a flow. i.e. advecting a streamlet do not produce a streamlet at the Arrow placement: In flow visualization, clutter and new frame. occlusion problems have been mainly addressed in the Our algorithm better covers the domain and avoids ar- context of streamline placement methods. These algo- row overlaps thanks to more complex creation and dele- rithms apply here since an arrow can be carried by a tion strategies, including backward propagation. Some- small streamline (streamlet) to better depict the local flow. how, it requires relaxing the realtime feature of particle Any of these numerous methods [18, 6, 13, 10] can be tracing. used since they guarantee that no streamlet will be placed within a distance dsep to its neighbours. It is also pos- sible to adapt the streamline density [16]. An animated 1 Moving arrow representation streamline placement has been proposed by Jobard and Lefer [7]. This later work renders the streamlines with During the animation, the arrows are represented with an animated texture that looks like particle trails advected glyphs mapped on rectangular supports. The supports along the streamline. Restricting these particle trails to are warped according to the local flow orientation and be aligned on streamlines makes it impossible to avdect magitude. Each arrow is initiated from a so-called han- them in the flow, and constrains all particles of a stream- dle point and its support is then warped according to a line to be born and die together. Moreover, the lifetime of short streamline integrated backward and forward from streamlines is more sensitive to flow evolution e.g. a flow the handle point (see figure 2). The integration length of with constant rotation in time will create spinning arrows the streamlets is such that their length is proportional to with our algorithm whereas streamlines would have very the local velocity magnitude of the flow. short lifetime. Other methods have been proposed to nicely distribute glyphs. Hiller et al. [5] minimizes Lloyd’s energy to evenly distribute glyph’s positions and other works aim to place a minimal number of glyphs [17, 11] to repre- sent the flow. However, these works do not extend nicely to unsteady flows. An error diffusion approach has been proposed [3] to distribute glyphs in unsteady flows, but it exhibits both high popping and the distribution is not convincing. Figure 2: Arrow Anatomy. An arrow glyph is mapped on Particle tracing: The dynamics of the flow can be re- a rectangular support of a given thickness warped along a vealed by visualizing particles advected in the domain. streamlet integrated from a central handle point. Contrary to arrows, the small size of particle glyphs min- imizes the occlusion problems. Inter particle distances More formally, given a 2D time-dependent vector field has not to be checked and the density is mainly controlled v(x,t) = (vx,vy), a streamline S is a parametric curve S(τ) by the seeding strategy. Bauer et al. use tiles of Sobol defined at time t and initiated from an handle point p. S(τ) quasi-random positions to regularly seed particles in re- is given by the equation: gion of interest of unsteady 3D flows [1]. Since they deal with incompressible flows, the initially constant density dS = v(S(τ),t) with S(0) = p of injected particles remains constant during the advec- dτ tion process. Following the same framework, Helgeland and Elboth [4] enhanced the rendering with anisotropic The streamlets have a constant integration length L and

3 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots any sample point of the streamlet S is given by: previous time step are inserted into the current one (see Section 2.2 and the orange arrows in Figure 3). Z l L L S(l) = S(0) + v(S(τ),t)dτ with l ∈ [− , ] Second, the current time step is completed with new 0 2 2 arrows inserted in the previous stage (see the red ar- A standard Runge-Kutta integration scheme is used to rows in Figure 3, bottom). sample the streamlets backward and forward from their • S3. The third stage iterates from the last time step to handle point. the first one, and advances arrow’s birth when possi- To prevent having severely distorted arrows in high ve- ble, thus increasing arrow’s lifetime (see the “back- locity regions, streamlets might be clamped if the support ward” paragraph in Section 2.2 and the green arrows aspect ratio (arrow length over thickness) becomes supe- in Figure 3). rior to a given user threshold. To intuitively convey the dynamics of the flow, it is preferable for the arrows to be transported along the flow. Algorithm 1: PlaceMovingArrows Since their shape is determined at any time step by the Output: arrows // set of arrows streamlet integration, only the handle point is advected Data : tmax // max vector field time step from one step to the next. This particular point follows a pathline trajectory P initiated from a seed point ps at time CompleteTimeStepWithArrows (0, arrows); S1 ts: for time ← 1 to tmax do dP ∆t ← 1; // forward advection = v(P(t),t) with P(ts) = ps

dt S2 PropagateArrowsOneStep (time, ∆t, ar- An arrow will then move along this trajectory between rows); its birth time tb and its death time td (tb ≤ ts ≤ td). Both CompleteTimeStepWithArrows (time, ar- tb and td are determined by the arrow reaching the bound- rows); aries of the space-time domain or by a lack of empty space for time ← tmax − 1 downTo 0 do requiered to place its support as discussed in the following ∆t ← −1; // backward advection section. S3 PropagateArrowsOneStep (time, ∆t, ar- rows); 2 Uniform placement of moving ar- The two next sections explain how individual anima- rows tion frames are populated with new arrows (see Sec- tion 2.1) and how these arrows will be propagated to first To uniformly place moving arrows over the domain, our populate the next time step (see Section 2.2). algorithm successively fills each time step with as many arrows as possible such that a minimal ”separating” dis- 2.1 Completing a time step with evenly- tance dsep is respected between arrows. The dsep parame- ter controls the tradeoff between the competing objectives spaced arrows of avoiding cluttering and covering the whole domain. Evenly distributing arrows over a 2D domain could be ad- Animation frames are populated with arrows by the Al- dressed by Lloyd’s relaxation [5]. However, in the dy- gorithm 1, which consists in three stages. namic case, it is sufficient to use a faster algorithm as the • S1. The first stage fills the first time step with distribution quality will decrease rapidly due to arrow dis- evenly-spaced arrows (see Section 2.1 and the red placements. Therefore the problem can be reduced here arrows in Figure 3). to the well studied placement of streamlets. We imple- mented a quite standard greedy approach that works as • S2. The second stage iterates over the time steps. follows (see Algorithm 2): from a sufficiently dense sam- First, the arrows that can be propagated from the pling of the domain, streamlets are successively integrated

4 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

Algorithm 2: CompleteTimeStepWithArrows Input : time // current time step In/Out : arrows // set of arrows Data : dseed // seeding distance Fill a vector seedPositions with domain sampling positions; foreach position ∈ seedPositions do newArrow ← CreateArrow (position, time); if Distance (newArrow, arrows, time)> dseed then arrows.Insert (newArrow);

where to place candidate arrows (Section 2.1.2) and when to stop trying.

2.1.1 Evaluating the distance between arrows The distance between arrows is approximated by the min- imal distance between their streamlets. In our implemen- tation, the distance from any point of the domain to the existing arrows is stored in a discretized distance map, which is filled with a fast marching algorithm. The dis- tance requests are then fast to process since they only re- quire accessing the distance map at the requested loca- Figure 3: First and second time step of an animation. tions. The distance map resolution is defined with respect to dsep as illustrated in Figure 6. This approach also re- (Top) The empty domain is first filled with dseed-separated arrows (red). (Bottom) The arrows from the previous time mains efficient in the presence of adaptive arrow density step are propagated into the current one (orange) and new (see Section 3.2). arrows are inserted. (Right to left) Then empty spaces are filled with backward propagated arrows (green) from fu- 2.1.2 Choosing where to seed the arrows ture time steps. The semi-transparent arrow on the right image is removed to preserve the minimal separating dis- The purpose of the seeding strategy is to cover the whole tance. domain with arrows as close as possible to the maximum authorized density. A simple solution is to create a shuf- fled list of positions in a Cartesian grid, and always select the next position in the list. from these sample positions and are inserted into the rep- In Algorithm 2 the arrow density is controlled by the resentation if their distance to already placed streamlets is parameter dseed, which would be equal to dsep for static superior to a seeding distance dseed (with dseed > dsep as representations. Since arrows will be propagated to the explained in Section 2.1.2). next step (see Section 2.2), we introduce a security dis- Algorithm 2 requires evaluation of distance between a tance by taking dseed > dsep. This way, individual arrows new candidate arrow and the previously placed arrows have a higher probability to be propagated more steps (Section 2.1.1), and a seeding strategy that determines ahead before their distance to surrounding arrows falls

5 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

under the dsep threshold. We observe that setting dseed = To obtain progessive appearance and disappearance of 2dsep leads to satisfying results. The ratio dseed/dsep man- the arrows along the borders of the frame, it is necessary ages the tradeoff between the arrows life-time and the uni- to extend the domain with a buffer zone where the vector form domain coverage. field is extrapolated. The size of this hidden buffer zone is related to half the maximal length of the arrows. All the operations are performed on this extended domain. 2.2 Arrow propagation to the next step For each time step t, new arrows are iteratively introduced Algorithm 3: PropagateArrowsOneStep by Algorithm 2 but first, it is tested if it is possible to Input : time // current time step increase the life span of the arrows that exist at time step Input : ∆t// 1 is forward, -1 is backward t − 1 (forward) or t + 1 (backward) with Algorithm 3. In/Out : arrows // set of arrows During the forward stage, arrows evolve through ad- Data : vf // velocity vector field vection (of its handle point) and may enter into con- Data : dsep // separating distance flict with one another. Therefore, some arrows are to be deleted and the choice is made by a greedy approach: all prevTime ← time − ∆t; arrows alive at time t − 1 are taken in a heuristic order growingCandidates ← /0; // empty list and propagated one by one to time t. If an arrows con- foreach arrow ∈ arrows do if arrow.IsAlive (prevTime) flicts with already propagated arrows, it is discarded. This and not arrow.IsAlive (time) then method is fast and allows to favor arrows by defining pri- growingCandidates.Insert (arrow); ority criteria. In practice, sorting arrows by decreasing streamlet length in screen space allows to keep long ar- SortByPriority (growingCandidates); rows as much as possible, and therefore minimizes the foreach arrow ∈ growingCandidates do popping artifacts. The benefits of this strategy are illus- arrow.PropagateTo (time); trated in Figure 4. if Distance (arrow, arrows, time)< dsep then arrow.RemoveTimeStep (time);

3 Introducing an adaptive density of arrows Figure 4: Arrow propagation with priority. Giving pri- ority to short arrows (left) would kill long arrows and The algorithm defined in the previous section computes therefore waste a lot of space and create noticeable pop- a sparse set of moving arrows that keeps a uniform den- ping artifacts. Our strategy to propagate long arrows first sity over time. However, it is often interesting to adapt (right) resolves this issue by removing small arrows. the density of arrows to the local features of the flow (see Figure 5). This can be done by introducing a density map The backward stage is similar to the forward one, ex- which measures the scale at which the phenomenon needs cept that it does not try to introduce new arrows because to be captured. the empty spaces have already been filled during the for- The density map is a scalar field that gives the local ward stage. However, since the arrows have been seeded ”zoom factor” of the field: in particular, a value of 1 at least at the dseed distance to the surrounding ones, some means that the arrows are generated as with the previ- of these arrows might find enough place to propagate back ous algorithm, and in general a value scale means that until they reach the dsep separating distance. These cases the algorithm generates arrows as such that a close-up (of are illustrated with the green arrows on Figure 3. factor scale) of the region gives the same appearance as

6 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

Figure 5: Uniform vs. adaptive density of arrows. Figure 6: Resolution of the distance map. Setting the (Left) A uniform density of arrows will fail at revealing pixel width to be a quarter of dsep achieves a good trade- the turbulent areas if the separating distance is too high – off between the update time of the distance map and its or would overpopulate the domain with a small separat- accuracy. ing distance. (Right) Adapting the separating distance to a density field (green to red background) will adapt the number of arrows necessary for depicting the details of between arrows: the new distance is just scaled by the the flow. density. When comparing this new distance with dsep and dseed in the algorithm, the spacing between neighboring arrows becomes proportional to the inverse of the density. the previous algorithm. We first discuss possible ways to automatically define the density map, then present the The new distance is therefore the weigthed distance modifications of the algorithm required to add this feature. with respect to the density. A weigthed distance is for- maly defined in [14], and is commonly used in images applications such as image segmentation [15]. 3.1 Choice of a density map As introduced in section 2.1.1 the distance of each point The density map can be used to add more details to previously placed arrows is stored in a distance map. where the flow has more variations. It is therefore The distance map is now considered as a weighted graph natural to estimate it by a differential quantity derived where each pixel is connected to its 8 closest neighbors√ from the vector field. In our experiments, we esti- and the weights corresponds to the edge length (1 or 2 mate it by the Frobenius norm of the Jacobian matrix for diagonals) times the density map evaluated at this po- p 2 2 2 2 i.e. (∂vx/∂x) + (∂vx/∂y) + (∂vy/∂x) + (∂vy/∂y) , sition. The distance between two points (pixels) is then at the position x,y with the velocity field v(vx,vy). This the cost of the shortest path in this graph. quantity allows to focus on flow features as it is corre- Evaluating the distance to a new arrow from all pre- lated with both divergence and curl. However, other den- viously placed arrows only requires reading the distance sity maps may be more appropriate in particular cases, map at the sampling points of the new arrow. such as the velocity or vorticity magnitude as discussed in Schlemmer et al.’s work [16]. Regardless the way for es- Updating the distance map is a bit more difficult. It timating the density map, its values are set in the range first requires to be initialized to ∞, then for each new in- [1,scalemax] so that some regions can exhibit an arrow serted arrow, the distance field is updated by a n-seed Di- placement scalemax times denser than others. Most fre- jkstra algorithm (placing one seed for each point touched quently we set scalemax ≤ 10. by a rasterization of the arrow’s streamlet). The very spe- √cific nature of the graph (bounded weights between 1 and 2×scalemax) makes it possible to use simpler and more 3.2 Adapting the algorithm to handle a den- efficient algorithms such as [20]. sity map As illustrated in Figure 6, setting the pixel size of the The only thing we need to change in Algorithm 1 in or- distance map to be a quarter of the separating distance is der to take the density map into account is the distance enough to discretize the distance map.

7 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

4 Rendering arrows

To draw all the arrows, the rendering algorithm deter- mines the mapping of the arrow glyph onto the screen (Section 4.1), morphs the arrows to new symbols when the Figure 7: Glyph morphing sequence. The arrows are flow magnitude becomes too low (Section 4.3), and adds smoothly morphed to discs in regions of low velocity. transparency to reduce the popping artifacts (Section 4.2). this ensures that arrows length is always greater than ar- 4.1 Arrow mapping rows thickness. The support of the glyph also requires a special treat- The glyphs are centered on the handle point of the arrows. ment when its streamlet is shorter than the arrows thick- Our algorithm precomputes these positions at each time ness: the support is no longer obtained by thickening the step. For frames in-between time steps, the smoothness of streamlet, but by drawing a square centered on the han- arrow displacements is ensured by a cubic hermite inter- dle point and oriented by the vector between the streamlet polation (in time) of the handle point. From the interpo- extremities. lated handle points, a streamlet is integrated and a support Using a symbol with rotational invariance (disc) pre- is computed by thickenning it. For adaptive density, the vents the user from being distracted by the frequent rota- thickness of the support is divided by the local density to tions when the flow velocity is almost null. avoid occlusion with closest arrows. Notice that it would be possible to integrate (in time) the handle point position with Runge–Kutta, but we pre- 5 Results fer to interpolate them due to the asymmetry of the inte- gration scheme. Real datas

4.2 Fade-in and fade-out of arrows We have tested our method on a water flow (gulf of Mex- ico), two winds data (Europe’s Storm in 1999 and Ocean Popping effects come generally from the insertion and winds) and a simulated velocity jet. Snapshots of the re- deletion of arrows. To attenuate this effect, the arrows sulting animations can be found in Figure 8, and videos are rendered with an opacity coefficient that smoothly de- in the accompagning material. We tried to reflect the ca- creases near birth and death time steps. When the num- pabilities of our method. The image of the 1999 Europe’s ber of rendering frames is higher than the simulation time storm shows coarse structure of the cyclone, the arrows step, all arrows born (resp. died) at time t have the same morph smoothly between zones with high and low ve- transparency coefficient, leading to a visual artifact. This locity. The flow in the Gulf of Mexico and the veloc- can be solved by adding a random delay (shorter than a ity jet have well established currents as well as plenty of time step) before applying the fading effect. small turbulencies. To avoid overpopulation with plenty of small arrows, we used high variation of underlying den- 4.3 Arrow morphing sities and thus we capture tiny details while the well es- tablished flows are shown with longer and thicker arrows. Arrows are standard symbols to represent flows, however it may become misleading where the flow magnitude be- Synthetic data comes too low. Inspired by meteorologists, we decided to draw discs to indicate calm regions. The real data come from simulated or acquired flow fields, To render dynamic flows, a smooth transition between and they have a limited divergence (due to the limited arrows and discs (see Figure 7) allows the avoidance of compressibility of the fluids). As a consequence, the be- distracting symbol switches. The glyph to use is deter- havior of our method in extreme cases of divergence can mined by the streamlet length over glyph thickness ratio: not be observed on such data, so we rely on synthetic

8 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

Figure 8: Frames of animated arrow plots of different datasets.

fields to evaluate the limitation of our method. Even in Dataset processing frames vector field such cases, our algorithm is able to evenly distribute ar- (seconds) resolution rows in the field, as illustrated in Figure 9. Storm dec 1999 4.1 48 385 × 325 Ocean winds, 1987 56.7 40 1440 × 628 Velocity jet 45.5 500 128 × 256 Gulf of Mexico 19.25 183 352 × 320 Dipole 0.29 40 64 × 64 Timings

The table below shows the time necessary to pre-compute various animations used in this paper.

9 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

our animations.

Figure 9: Stress tests with synthetic vector fields having extreme divergence.

Figure 10: Arrows as pathlets or streamlets. Both im- 6 Discussion ages represent the same vortex moving from bottom to top. The arrows are bended along (Left) pathlets and 6.1 Accuracy and resolution (Right) streamlets. Green hollow arrows show the field at As stated in the introduction, a sparse set of arrows cannot timestep t − 4, red arrows at timestep t. Visually, the an- represent all details of the flow. To avoid high frequencies imation of streamlet-based arrows is more intuitive than from perturbing the algorithm, it is convenient to filter the pathlet-based one. data. A convolution with a Gaussian having the minimal arrow size as standard deviation is sufficient to maintain undistorted arrows. As a consequence, sampling the flow 6.3 Comparison with a resolution higher than one pixel corresponding to the minimal arrow size is not useful for the algorithm. As stated in the introduction, our objective is to produce The time resolution of the flow do not impact the result pleasing and easy to understand animations to represent a quality as long as the distance between neighbor arrows 2D flow field. As illustrated here with flow textures and at each time step is a fair approximation of this distance fixed position arrows, previous methods only partially sat- between two consecutive time steps. In practice, the dis- isfy these constraints. placement of an arrow handle point between two frames Fixed position arrows (see top middle image of fig- should not be greater than the arrow length. ure 11) can overlap and their alignement can be distract- ing. It is a fair solution to visualize fields in a realtime 6.2 Streamlets vs. pathlets context, or for vector fields where advection would be meaningless such as electromagnetic fields that are not As mentioned in the section 1, the arrow shapes follow flows. However, our algorithm offers a more uniform cov- streamlines, while their centers move on pathlines. This erage and a natural displacement of the arrows. means that the arrows in the visualization can point into Flow texture methods cannot represent flow orienta- different directions than the arrows move to. It may seem tion and its magnitude without deteriorating global ren- more natural to use pathlets for arrow support. On the dering quality. It is also difficult to combine it with other positive side, arrows move into the direction they point sources of information such as a detailed background as to. On the negative side, pathlets show history of the un- illustrated in figure 11. derlying field and not the current state of the flow. Moreover, texture based methods may suffer from bad In the case of steady flows or short arrows, using rendering device (gamma or resolution) and video com- streamlet or pathlet is almost equivalent. In other cases, pression. Our method does not provide an as accurate using pathlines creates confusing effects as illustrated in representation of the flow details, but does not suffer from Figure 10. Thus, we choose streamlets to carry arrows in these drawbacks.

10 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

Figure 11: Visualizing a flow with a background image. Top row, left-to-right: Flow texture, bent arrows on a uniform grid and with our method. Compared to flow textures, arrows temporary occlude the background but do not deteriorate it. Bottom row, left images: arrow plots are less sensitive to the display resolution; two right images: certain anisotropic textures such as aerial photographies interfere with flow textures.

Acknowledgments that first come to mind as counter-examples that could challenge our method are correctly handled by our algo- We wish to thank MeteoSwiss for the dataset of the winds rithm and are not likely to occur often in real flows. over Europe, the Center for Ocean-Atmospheric Predic- tion Studies (COAPS) for the dataset of the ocean cur- rents in the Gulf of Mexico, Remote Sensing System for References the dataset of the winds around the world and Christoph Garth at UCDAVIS for the dataset of the high velocity jet. [1] D. Bauer, R. Peikert, M. Sato, and M. Sick. A case study in selective visualization of unsteady 3D flow. In Proceedings of the conference on Visual- ization’02, pages 525–528. IEEE Computer Society, Conclusion 2002.

We have developed a representation of dynamic vector [2] D. Dovey. Vector plots for irregular grids. In Pro- fields by moving arrows. Despite the intuition that the di- ceedings of the 6th conference on Visualization’95, vergence will always create incessant popping effects, we page 248. IEEE Computer Society, 1995. were able to produce convincing videos. It was acheived by coupling arrow generation and rendering strategies. [3] A. Hausner. Animated visualization of time-varying Moreover, the extreme cases of divergence (source, sink) 2D flows using error diffusion. In Proceedings of the

11 B. Jobard, N. Ray and D. Sokolov Visualizing 2D Flows with Animated Arrow Plots

working conference on Advanced visual interfaces, [13] A. Mebarki, P. Alliez, and O. Devillers. Farthest pages 436–439. ACM, 2006. point seeding for efficient placement of streamlines. In Visualization, 2005. VIS 05. IEEE, pages 479– [4] A. Helgeland and T. Elboth. High-quality and inter- 486. IEEE, 2005. active animations of 3d time-varying vector fields. Visualization and Computer Graphics, IEEE Trans- [14] F. Memoli´ and G. Sapiro. Fast computation of actions on, 12(6):1535–1546, 2006. weighted distance functions and geodesics on im- plicit hyper-surfaces. Journal of Computational [5] S. Hiller, H. Hellwig, and O. Deussen. Beyond Physics, 173(2):730–764, 2001. stippling—methods for distributing objects on the plane. In Computer Graphics Forum, volume 22, [15] A. Protiere and G. Sapiro. Interactive image seg- pages 515–522. Wiley Online Library, 2003. mentation via adaptive weighted distances. Im- age Processing, IEEE Transactions on, 16(4):1046– [6] B. Jobard and W. Lefer. Creating evenly-spaced 1057, 2007. streamlines of arbitrary density. Visualization in Sci- entific Computing, 97:43–56, 1997. [16] M. Schlemmer, I. Hotz, B. Hamann, F. Morr, and H. Hagen. Priority streamlines: A context-based vi- [7] B. Jobard and W. Lefer. Unsteady flow visualiza- sualization of flow fields. In Eurographics/IEEE- tion by animating Evenly-Spaced streamlines. In VGTC Symposium on Visualization, page 227–234. Computer Graphics Forum, volume 19, pages 31– Citeseer, 2007. 39. Wiley Online Library, 2000. [17] A. Telea and J. J Van Wijk. Simplified representation [8] R. V Klassen and S. J Harrington. Shadowed hedge- of vector fields. In Visualization’99. Proceedings, hogs: A technique for visualizing 2D slices of 3D pages 35–507. IEEE, 1999. vector fields. In Proceedings of the 2nd conference on Visualization’91, pages 148–153. IEEE Com- [18] G. Turk and D. Banks. Image-guided streamline puter Society Press, 1991. placement. In Proceedings of the 23rd annual con- ference on Computer graphics and interactive tech- [9] R. S Laramee, H. Hauser, H. Doleisch, B. Vrolijk, niques, pages 453–460. ACM, 1996. F. H Post, and D. Weiskopf. The state of the art in flow visualization: Dense and Texture-Based tech- [19] J. J Van Wijk. Image based flow visualization. In niques. In Computer Graphics Forum, volume 23, ACM Transactions on Graphics (TOG), volume 21, pages 203–221. Wiley Online Library, 2004. pages 745–754. ACM, 2002. [10] Z. Liu, R. Moorhead, and J. Groner. An ad- [20] L. Yatziv, A. Bartesaghi, and G. Sapiro. O (N) vanced evenly-spaced streamline placement algo- implementation of the fast marching algorithm. rithm. IEEE Transactions on Visualization and Journal of Computational Physics, 212(2):393–399, Computer Graphics, pages 965–972, 2006. 2006. [11] A. McKenzie, S. V Lombeyda, and M. Desbrun. Vector field analysis and visualization through varia- tional clustering. In Eurographics-IEEE VGTC Sym- posium on Visualization, volume 2005, 2005.

[12] 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. Wi- ley Online Library, 2010.

12