0% found this document useful (0 votes)
37 views

Lec 5 Vector Field Visualization

Computer graphics

Uploaded by

Poop
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Lec 5 Vector Field Visualization

Computer graphics

Uploaded by

Poop
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Vector Field Visualization

Leif Kobbelt

Types of Data
dimension of nD
data type
3D

2D

1D

0D

1D
2

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

2D

3D
2

nD

dimension of
domain

Characteristic Lines
Types of characteristic lines in a vector field:
stream lines: tangential to the vector field
path lines: trajectories of massless particles
in the flow (non-static flow fields)
streak lines: trace of dye that is deposited
into the flow at a fixed position
time lines (time surfaces): propagation of
a line (surface) of massless elements in time
3

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

Characteristic Lines

stream lines
tangential to the vector field
stationary vector field (arbitrary, yet fixed time t)
stream line is a solution to the initial value
problem of an ordinary differential equation:
L0 x 0

dLu
v Lu
du

initial value
(seed point x0)
4

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

ordinary differential equation

Characteristic Lines

path lines
trajectories of massless particles in the flow
vector field can be time-dependent (unsteady)
path line is a solution to the initial value problem
of an ordinary differential equation:
L0 x 0

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

dLt
v Lt , t
dt

Characteristic Lines

streak lines

trace of dye that is released into the flow at a fixed


position
connect all particles that passed through a certain
position (non-stationary flow)

time lines (time surfaces)

propagation of a line (surface) of massless elements


over time
many point-like particles that are traced synchronously
connect particles that were deposited simultaneously

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

Characteristic Lines

comparison of path lines, streak lines, and stream lines

t0

t1

path line

t2

t3

streak line stream line for t3

path lines, streak lines, and stream lines are identical


for stationary flows
7

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

Characteristic Lines

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

Arrows and Glyphs

visualize local features of the vector field:


vector itself
vorticity
external data: temperature, pressure, etc.

important elements of a vector:


direction
magnitude
not: components of a vector

approaches:
arrow plots
glyphs

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

Arrows and Glyphs

arrows visualization
direction of vector field
orientation
magnitude:

length of arrows
color coding

10

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

10

Arrows and Glyphs

arrows

11

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

11

Arrows and Glyphs

glyphs
can visualize more features of the vector field
(flow field)

12

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

12

Arrows and Glyphs

pros and cons of glyphs and arrows:


+ simple
+ 3D effects
- heavy load in the graphics subsystem
- inherent occlusion effects
- poor results if magnitude of velocity changes
rapidly (use arrows of constant length and
color code magnitude)

13

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

13

Mapping Methods Based on Particle


Tracing
basic idea: trace particles
characteristic lines
local or global methods
mapping approaches:
lines
surfaces
individual particles
sometimes animated

14

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

14

Mapping Methods Based on Particle


Tracing
path lines

15

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

15

Mapping Methods Based on Particle


Tracing
stream balls
encode additional scalar value by radius

16

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

16

Mapping Methods Based on Particle


Tracing
streak lines

17

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

17

Mapping Methods Based on Particle


Tracing
stream ribbons

trace two close-by particles


keep distance constant

18

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

18

Mapping Methods Based on Particle


Tracing
stream tubes

specify contour, e.g. triangle


or circle, and trace it through
the flow

19

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

19

Mapping Methods Based on Particle


Tracing
LIC (Line Integral Convolution)

20

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

20

Numerical Integration of ODEs

typical example of particle tracing problem (path


line):
L0 x 0

dLt
v Lt , t
dt

initial value problem for ordinary differential


equations (ODE)
what kind of numerical solver?

21

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

21

Numerical Integration of ODEs


rewrite ODE in generic form
initial value problem for:
x (t ) f (x, t )

most simple (naive) approach: explicit Euler method


x(t t ) x(t ) t f (x, t )

based on Taylor expansion


x(t t ) x(t ) t x (t ) O(t 2 )

first order method


increase accuracy by smaller step size

22

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

22

Numerical Integration of ODEs

Problem of explicit Euler method


inaccurate
unstable

Example:
x kx
x e kt

divergence for t > 2/k


23

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

23

Numerical Integration of ODEs

Implicit Euler method

Approximation of derivative
x(t t ) x(t )
x (t t )
t
Implicit timestep
x(t t ) x(t ) t x (t t )
Solution of linear system due to the derivative at the unknown
new position

Also method of first order

24

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

24

Numerical Integration of ODEs

Midpoint method
1. explicit Euler step
x t f (x, t )

2. Evaluation of f at midpoint
x
t

f mid f x
,t
2
2

3. Complete step with value at midpoint


x(t t ) x(t ) t f mid

Method of second order


25

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

25

Numerical Integration of ODEs


Classical Runge-Kutta of fourth order

k 1 t f (x, t )
k
t

k 2 t f x 1 , t
2
2

k
t

k 3 t f x 2 , t
2
2

k 4 t f x k 3 , t t
x(t t ) x(t )

26

k1 k 2 k 3 k 4

O t 5
6
3
3
6

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

26

Numerical Integration of ODEs


adaptive stepsize control

change step size according to the error


decrease/increase step size depending on whether
the local error is high/low
higher integration speed in simple regions
good error control
approaches:
stepsize doubling
embedded Runge-Kutta schemes

further reading:

WH Press, SA Teukolsky, WT Vetterling, BP Flannery: Numerical


Recipes

27

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

27

Particle Tracing on Grids

vector field given on a grid


solve
dLt
L0 x0 ,
vLt , t
dt

for the path line


incremental integration
discretized path of the particle

28

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

28

Particle Tracing on Grids


most simple case: Cartesian grid
basic algorithm:
Select start point (seed point)
Find cell that contains start point
While (particle in domain) do

point location

Interpolate vector field at


interpolation
current position
Integrate to new position integration
Find new cell
point location
Draw line segment between latest
particle positions
Endwhile

29

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

29

Line Integral Convolution

a global method to visualize vector fields

30

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

30

Line Integral Convolution


line Integral Convolution (LIC)

visualize dense flow fields by imaging its integral curves


vover domain with a random texture (so called input texture, usually
stationary white noise)
blur (convolve) the input texture along the path lines using a specified filter
kernel

look of 2D LIC images

intensity distribution along path lines shows high correlation


no correlation between neighboring path lines

31

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

31

Line Integral Convolution

idea of Line Integral Convolution (LIC)


global visualization technique
start with random texture
smear out along stream lines

32

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

32

Line Integral Convolution

algorithm for 2D LIC

let t F0(t) be the path line containing the point (x0,y0)


T(x,y) is the randomly generated input texture
compute the pixel intensity as:
L

I ( x0 , y0 ) L k (t ) T (0 (t )) dt

convolution with
kernel

kernel:

33

finite support [-L,L]


normalized
often simple box filter
often symmetric (isotropic)

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

k t dt 1
L

kernel
k(t)
-L

33

-L

Line Integral Convolution


algorithm for 2D LIC
convolve a random texture
along the stream lines

34

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

34

Line Integral Convolution

Input noise

Vector field

k t dt 1
L

Convolution

kernel
k(t)
-L

-L

Final image

35

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

35

Line Integral Convolution

fast LIC
problems with LIC

new stream line is computed at each pixel


convolution (integral) is computed at each pixel
slow

improvement:

compute very long stream lines


reuse these stream lines for many different pixels
incremental computation of the convolution integral

36

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

36

Line Integral Convolution

fast LIC: incremental integration


discretization of convolution integral
summation

TL
xL

Tn
xn

assumption: box filter

k t

1
2L 1

x-m
T-m
37

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

T0

x0

T-L
x-L
37

I0

1
2L 1

i -L

Line Integral Convolution

fast LIC: incremental integration


discretization of convolution integral
summation

TL
xL

Tn
xn

assumption: box filter

k t

1
2L 1

x-m
T-m
38

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

T0

x0

T-L
x-L
38

I0

1
2L 1

i -L

I1 I 0 TL 1 T- L /( 2 L 1)

Line Integral Convolution


fast LIC: incremental integration for constant kernel
stream line x-m,..., x0,..., xn with m,n L
given texture values T-m,...,T0,...,Tn
what are results of convolution: I-m+L,..., I0,..., In-L?

for box filter (constant kernel):


I0

1
2L 1

i -L

incremental integration:

I j 1 I j
39

T
L

1
2L 1

i -L

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

i j 1 Ti j

39

1
2L 1

L j 1

T- L j

Line Integral Convolution

fast LIC: Algorithm

data structure for output: Luminance/Alpha image

luminance = gray-scale output


alpha = number of streamline passing through that pixel

For each pixel p in output image


If (Alpha(p) < #min) Then
Initialize streamline computation with x0 = center of p
Compute convolution I(x0)
Add result to pixel p
For m = 1 to Limit M
Incremental convolution for I(xm) and I(x-m)
Add results to pixels containing xm and x-m
End for
End if
End for
Normalize all pixels according to Alpha

40

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

40

Line Integral Convolution


oriented LIC (OLIC):

visualizes orientation (in addition to direction)


sparse texture
anisotropic convolution kernel
acceleration: integrate individual drops and compose them to final
image

-l

41

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

anisotropic
convolution kernel

41

Line Integral Convolution


oriented LIC (OLIC)

42

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

42

Line Integral Convolution


LIC - Line Integral Convolution

43

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

43

Line Integral Convolution

Lic-Applications: length of convolution integral


with respect to magnitude of vector field
44

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

44

Line Integral Convolution

Lic and color coding of velocity magnitude


45

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

45

Line Integral Convolution

summary:

dense representation of flow fields


convolution along stream lines correlation along
stream lines
for 2D and 3D flows
stationary flows
extensions:
Unsteady flows
Animation
Texture advection

46

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

46

3D Vector Fields

most algorithms can be applied to 2D and 3D


vector fields
main problem in 3D: effective mapping to
graphical primitives
main aspects:
occlusion
amount of (visual) data
depth perception

47

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

47

3D Vector Fields

approaches to occlusion issue:


sparse representations
animation
color differences to distinguish separate objects
continuity
reduction of visual data:
sparse representations
clipping
importance of semi-transparency

48

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

48

3D Vector Fields
missing continuity

49

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

49

3D Vector Fields

color differences to identify connected structures

50

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

50

3D Vector Fields
reduction of visual data
3D LIC

51

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

51

3D Vector Fields

improving spatial perception:


depth cues
perspective
occlusion
motion parallax
stereo disparity
color (atmospheric, fogging)
halos
orientation of structures by shading (highlights)

52

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

52

3D Vector Fields
illumination

53

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

53

3D Vector Fields
illuminated streamlines [Zckler et al. 1996]
model: streamline is made of thin cylinders
problem
no distinct normal vector on surface
normal vector in plane perpendicular to tangent: normal space
cone of reflection vectors

54

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

54

3D Vector Fields
illuminated streamlines (cont.)
light vector is split in tangential and normal parts
V R V LT L N V (L T)T (L N)N
(L T)(V T) (L N)(V N)
(L T)(V T) 1 (L T) 2 1 (V T) 2
f (L T), (V T)

Idea: Represent f() by 2D texture


Access pre-computed f() during
rendering

55

Visual Computing Institute | Prof. Dr. Leif Kobbelt


Computer Graphics and Multimedia
Geometry Processing

55

You might also like