Flow Visualisation Visualisation Lecture 13 Institute for Perception, Action & Behaviour School of Informatics Flow Visualisation 1
Flow Visualisation... so far Vector Field Visualisation vector fields indicate transport (i.e. flow) local methods for local direction and magnitude global methods for flow sources and paths global methods require: numerical integration particle trace calculation rakes for initialisation Flow Visualisation 2
Rakes a reminder Shape (or topology) of stream origin Flow Visualisation 3
Stream Ribbons & Surfaces Concept : initialise two streamlines together flow rotation: lines will rotate around each other flow convergence/divergence: relative distance between lines both not visible with regular separate streamlines Streamribbon Streamsurface initialise 2 streamlines from a rake line and connect with polygons initialise multiple streamlines along a base curve or line rake and connect with polygons Flow Visualisation 4
Streamribbons Initialisation : two connected streamlines Global view of vector field flow as per streamlines Local view of vector field variation width of ribbon (distance between connected lines) = cross-flow divergence twisting of ribbon = streamwise vorticity rotation of the vector field flow around the streamline axis of rotation = vector field direction (in stream) magnitude of rotation = vorticity Flow Visualisation 5
Example : streamribbons Local information clearer using ribbons cannot show vorticity rotation with un-orientated line Streamribbons Problem if streamlines diverge significantly expect ribbon orientation to be tangent to vector field Streamlines Flow Visualisation 6
Streamsurfaces Initialisation: infinite number of connected streamlines originating from a given base curve (i.e. the rake) streamribbons are special case of streamsurfaces by using a closed base curve streamtubes generate multiple streamlines from user specified rake, connect adjacent lines with polygons Properties: surface orientation at any point on surface tangent to vector field no visual interpolation required by viewer additional information : divergence & vorticity Flow Visualisation 7
Example : streamtubes Size of tube varies with temperature and velocity of the flow. Local variance in flow clearer than with glyphs / lines /dots Flow Visualisation 8
Flow Volumes : simulated smoke initialise with a seed polygon the rake calculate streamlines at the vertices. split the edges if the points diverge. Flow Visualisation 9
Rendering Flow Volumes Temporal Volume Rendering of Flow define colour based on vorticity good property to render due to persistence dependence on previous states [Max, Becker, Crawfis http://www.llnl.gov/graphics/sciviz.html] Flow Visualisation 10
Flow Visualisation Limitations Plotting Methods take up too much space to plot wasted space in between glyphs when used simulations getting larger and larger Streamline methods (global view lecture 12/13) also take up a lot of space user definition of rakes domain/task specific Particle methods (e.g. storm, lecture 12) particles tend to bunch and poorly sample the domain Flow Visualisation 11
Flow Visualisation Ideals -? High Density Data ability to visualise dense vector fields Effective Space Utilisation each output pixel (in rendering) should contain useful information Visually Intuitive understandable Geometry independent not requiring user or algorithmic sampling decisions that can miss data Efficient for large data sets, real-time interaction Dimensional Generality handle at least 2D & 3D data Flow Visualisation 12
Direct Image Synthesis Concept : modify an image directly with reference to the vector flow field alternative to graphics primitives modified image allows visualisation of flow Practice : use image operator to modify image modify operator based on local value of vector field use initial image with no structure (e.g. in VTK) e.g. white noise (then modified by operator to create structure) Flow Visualisation 13
Example : Direct Image Synthesis Line Integral Convolution (LIC) image operator = convolution Vector Field White Noise Image LIC Image Graphics : http://www.hpc.msstate.edu/~zhanping/research/flowvis/lic/lic.htm Flow Visualisation 14
How? - image convolution Filter Kernel Input pixels Output pixels Each output pixel p' is computed as a weighted sum of pixel neighbourhood of corresponding input pixel p weighting / size of neighbourhood defined by kernel filter Flow Visualisation 15
Example : image convolution Linear convolution applied to an image linear kernel (causes blurring) Flow Visualisation 16
Effects of Convolution convolution blurs the pixels together amount and direction of blurring defined by kernel perform convolution in the direction of the vector field use vector field to define (and modify) convolution kernel produce the effect of motion blur in direction of vector field strong correlation along the vector field streamlines no correlation across the streamlines. Flow Visualisation 17
Principle of LIC Input white noise. Streamlines in vector field LIC result Flow Visualisation 18
Example : wind flow using LIC Colour-mapped LIC Data: atmospheric wind data from UK Met. Office Visualisation : G. Watson (UoE) Flow Visualisation 19
LIC : stated formally p is the image domain s is the parameter along the streamline, L is streamline length F(p) is the input image F (p) is the output LIC image P(s) is the position in the image of a point on the streamline Denominator normalises the output pixel (i.e. maps it back into correct value range to be an output pixel) k(s) is the convolution kernel Flow Visualisation 20
LIC : streamline calculation Constrain the image pixels to map 1-to-1 to the vector field cells for each vector field cell, the input white noise image has a corresponding pixel Compute the streamline forwards and backwards in the vector field using variable-step Euler method. Compute the parametric endpoints of each line streamline segment that intersects a cell. Flow Visualisation 21
LIC : variable step Euler's method Image and vector field cells. P3 P2 P1 P0 Flow Visualisation 22
LIC : approximating the kernel integral si 1 Image and vector field cells h i= k s ds s3 si Find parametric endpoints of line intersections s2 s1 P0 Between endpoints line is straight with constant valued F(p). Evaluate using 1D summed area table Flow Visualisation 23
LIC : output image Choice of L is important too small, not enough blurring (noise remains) too large, miss small features Choice of Filter kernel Average filter is simplest Gaussian based kernel gives better localisation Flow Visualisation 24
What does the LIC show? Constant length convolution kernel small scale flow features very clear no visualisation of velocity magnitude from vectors can use colour-mapping instead Kernel length proportional to velocity magnitude large scale flow features are clearer poor visualisation of small scale features Flow Visualisation 25
LIC : 2D results Variable length Kernel Fixed length Kernel Flow Visualisation 26
Example : colour-mapped LIC Zoom into an LIC image with colour mapping Colourmap represents pressure [Stalling / Hege ] Flow Visualisation 27
LIC : extension to 3D LIC on uv parametric surfaces Vector field on surface to be visualised uv coordinates are the same as used in texture coordinates v u Perform LIC in uv parameter space Flow Visualisation 28
LIC : 3D results Flow Visualisation 29
LIC : steady / unsteady flow LIC : Steady Flow only (i.e. streamlines) animate : shift phase of a periodic convolution kernel [Cabral/Leedom '93] UFLIC : Unsteady Flow Streaklines are calculated rather than streamlines convolution takes time into account. Result of previous time step is used for input texture for next step [Kao/Shen '97] Flow Visualisation 30
VTK : stream surfaces StreamTube vtkstreamline object through vtkstreamtube filter StreamRibbon - vtkribbonfilter (lines to ribbons) StreamSurface - vtkstreamline object through vtkruledsurfacefilter filter Flow Visualisation 31
Summary Stream ribbons and surfaces: global visualisation of vector field and visualisation of local vector field variations methods have limitations LIC steady flow visualisation using direct image synthessis convolution with kernel function 3D & unsteady flow extensions Flow Visualisation 32