Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok...

8
1 1 Visualisatie BMT Algorithms - 2 Arjan Kok [email protected] 2 Lecture overview Vector algorithms Tensor algorithms Modeling algorithms 3 Vector algorithms Vector 2 or 3 dimensional representation of direction and magnitude (e.g. speed, force) force = (0, -0.5) force = (2,1) force = (1,1) speed = (3,2) 4 Vector algorithms Hedgehogs Warping Oriented glyphs Displacement plots Time animation Stream lines, streak lines Stream ribbons, stream surfaces 5 Time animation Move point or object over a small time step Velocity (vector) at position x: V(x) = dx/dt Displacement of point: dx = V(x)dt Repeatedly displace points over many time steps 6 Time animation Position of point at time t: = t 0 dt )) t ( x ( V ) t ( x

Transcript of Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok...

Page 1: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

1

1

VisualisatieBMT

Algorithms - 2

Arjan Kok

[email protected]

2

Lecture overview

• Vector algorithms

• Tensor algorithms

• Modeling algorithms

3

Vector algorithms

• Vector

• 2 or 3 dimensional representation of direction and

magnitude (e.g. speed, force)

force = (0, -0.5)

force = (2,1)

force = (1,1) speed = (3,2)

4

Vector algorithms

• Hedgehogs

• Warping

• Oriented glyphs

• Displacement plots

• Time animation

• Stream lines, streak lines

• Stream ribbons, stream surfaces

5

Time animation

• Move point or object over a small time step

• Velocity (vector) at position x: V(x) = dx/dt

• Displacement of point: dx = V(x)dt

• Repeatedly displace points over many time steps

6

Time animation

• Position of point at time t:

�=

t

0

dt))t(x(V)t(x

Page 2: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

2

7

Time animation

• Give initial position x0 (release point)

• Repeat

• Find cell (i, j, k) and offsets (r, s, t) for x (point location)

• Find velocity V(x) at x (interpolation)

• Compute next position (integration)

for given time step �t

• Until total time passed or new position is outside data set

�+=∆+

∆+ tt

t

dt))t(x(V)t(x)tt(x

8

Time animation

• Integration techniques

• Euler

• x(t+�t) = x(t) + V(x(t)) �t

• Runge-Kutta

• x(t+�t) = x(t) + �t /2 (V(x(t)) + V(x*(t+�t)))

• x*(t+�t) = x(t) + V(x(t)) �t

• …

9

Time animation

10

Time animation

• Accuracy depends on:

• Step size �t

• Accuracy of data set

• Accuracy of interpolation functions

11

Particle path

• Particle trace

• Trajectory of a single particle over time

• Path of one particle released at P at t = t0 to t = tn

P

t = t0 t = tn

12

Streak line

• Streakline

• Path of particles passing through one given fixed point

P over a time interval

• Connection of all particles at time ti that have

previously passed through point xi (e.g. source)

P

t = t0 t = tn

Page 3: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

3

13

Stream line

• Streamline

• Curve in the flow field which at a particular time, in tangent to the velocity vector at all points along the curve.

• Unsteady flow:

• continuous changing

• given line exists only at one moment in time.

P

t = t0 t = tn

14

Demo

• http://widget.ecn.purdue.edu/~meapplet/java/flowvis/Index

.html

15

Streamlines

• Visualization:

• Define starting points by

creating rake (source of

points)

• Draw stream lines

• Color lines according to

some attribute

• Magnitude of vector

• Other scalar

attributes

16

Streamlines

17

Stream ribbon

• Generate two adjacent streamlines

• Generate polygons by connecting point of both lines

• Shows twist (vorticity) and divergence (spread)

18

• Generate n streamlines passing starting at points on a curve

(rake)

• Generate polygonal mesh by connecting adjacent

streamlines

• Closed surface => streamtube

Stream surface / stream tube

Page 4: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

4

19

Streamtubes

20

Tensor algorithms

• A tensor is a high dimensional quantity

(in our case symmetric 3x3 matrices)

• Tensors describe e.g. the displacement and stress in a 3D

material

• We must study the eigenvectors and eigenvalues of the

matrix:

• Ax = �x where A is tensor matrix and x its

eigenvector

• det|A – �I| = 0

21

Tensor algorithms

• Express eigenvectors as:

• vi = �iei where ei is unit vector in direction

eigenvalue and �i eigenvalues

• Order eigenvalues such that

• �1 � �2 � �3 (major, medium and minor values)

22

Tensor ellipsoids

• Define an ellipsoid

• The shape and orientation of the ellipsoid represent the

relative size of the eigenvalues and the orientation of the

eigenvectors

• Algorithm

• Position a sphere at the tensor location

• Rotate the sphere around its origin

(using eigenvectors)

• Scale the sphere (using eigenvalues)

23

Tensor ellipsoids

24

Tensor ellipsoids

• Point load applied to elastic

material

• At the surface of material the

ellipsiods flatten because there

is no stress perpendicular to the

surface (except at stress point

itself)

Page 5: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

5

25

Tensor hyperstreamlines

• Decompose tensor field into three vector fields defined by

one of the eigenvectors

• Create a streamline through one of the vector fields

• Sweep an object (e.g. ellipse) along this streamline

• Use remaining vector fields to define major and minor

axis of ellipse

26

Tensor hyperstreamlines

27

Modeling algorithms

• Modeling algorithms

• Create or change dataset geometry or topology

• Algorithms on combined data

• Most general class of algorithms

28

Source objects

• Modeling simple geometry

• Supporting geometry

• Data attribute creation

• Source objects can be used as procedures to create data

attributes (e.g. a simulator)

• Attributes can be generated from a mathematical

function

• => implicit functions

29

Implicit functions

• Implicit functions

• F(x, y, z) = c

• Examples:

• Sphere: F(x, y, z) = x2 + y2 + z2 – R2

• Plane: F(x, y, z) = Ax + By + Cz + D

30

Implicit functions

• Properties of implicit functions

• Simple geometric description

• Easy definition to define common geometric shapes (spheres, planes, cylinders, ..)

• Region separation

• Implicit functions separate 3D spaceF(x, y, z) < 0, F(x, y, z) = 0, F(x, y, z) > 0

• Scalar generation

• Implicit functions convert position in space into scalar valueci = F(xi, yi, zi)

Page 6: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

6

31

Use of implicit functions

• Modeling objects

• Sample F on dataset and generate isosurface at contour

value ci

• Combine implicit functions to create more complex

objects using boolean operations (union, intersection,

and difference

• F + G = min(F(x, y, z), G(x, y, z))

• F * G = max(F(x, y, z), G(x, y, z))

• F – G = max(F(x, y, z), -G(x, y, z))

32

Use of implicit functions

• Modeling example

• f1 = (x-1.33)2 + y2 + z2 – 0.52

• f2 = (x-1.5)2 + y2 + (z-0.5)2 – 0.252

• f3 = f1 – f2

• f4 = y2 + z2 – x2tan2(20) (+ intersection with 2 planes)

• f5 = f4 + f3

f1 f2 f4f3 f5

33

Use of implicit functions

• Selecting data

• Choosing cells and points that lie within a particular

region of the dataset

• Algorithm

• For each cell in dataset

• Evaluate implicit function for all cell nodes

• A cell is selected if result has negative sign

34

Use of implicit data

• Data selection

Selecting with

sphere function

35

Use of implicit functions

• Data cutting

• Find dataset values on implicit surface

36

Use of implicit functions

• Data cutting

• Algorithm

• For each cell in dataset

• Evaluate implicit function for all cell nodes

• A cell is cut if not all positive or negative

• Generate the isosurface f(x, y, z) =0 within cell

• Generate data attributes for isosurface by

interpolation along cut edges

Page 7: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

7

37

Use of implicit functions

• Data cutting

Data cutting with

plane function

38

Use of implicit functions

• Clipping

• Limit the data to be processed or displayed

• Usually with plane

39

Use of implicit functions

• Clipping

• Algorithm

• Evaluate implicit function for all cell nodes

• If all positive => remove cells

• If all negative => copy cells

• Else

• Generate the isosurfaces f(x, y, z) =0 within cell

and generate new cells.

• Generate data attributes for isosurface by

interpolation along cut edges

40

Glyphs

• A glyph is any object which is parameterized by some data

• May be positioned, oriented, scaled, deformed, colored,

.. in response to data

41

Data extraction

• Data extraction

• Extract portions of data from dataset

• Techniques:

• Geometry extraction

• Thresholding

42

Data extraction

• Geometry extraction

• Extracts data based on geometric or topological characteristics

• Select cells/nodes within specified range of ids

• Spatial extraction

• Define regions (e.g. by implicit function)

• See data selection

• Subsampling

• Select part of original data

• Only select every n-th data node

• Modifies topology of dataset

Page 8: Lecture overview Visualisatieakok/2Z860/vis05.pdf · Visualisatie BMT Algorithms - 2 Arjan Kok a.j.f.kok@tue.nl 2 Lecture overview • Vector algorithms • Tensor algorithms •

8

43

Data extraction

• Thresholding

• Extracts data based on attribute values

• Examples

• Select all nodes with scalar values within specified

range

• Select all nodes with vector magnitude within

specified range

44

Probing

• Resampling method

• Create output dataset by sampling input dataset

• Get attributes for output dataset by interpolation from

attributes of input dataset

45

Probing