• 沒有找到結果。

SCALAR VISUALIZATION

N/A
N/A
Protected

Academic year: 2022

Share "SCALAR VISUALIZATION"

Copied!
76
0
0

加載中.... (立即查看全文)

全文

(1)

SCALAR VISUALIZATION

(2)

OUTLINE

• Visualizing scalar data

A number of the most popular scalar visualization techniques

Color mapping

Contouring

Height plots

Color mapping

Design of effective colormaps

Contouring in 2D and 3D

Height plots

(3)

VISUALIZATION PIPELINE

1. Data Importing 2. Data Filtering 3. Data Mapping 4. Date Rendering

(4)

SCALAR FUNCTION

10]) [Chap.

ion Visualizat

Volume

Slicing, ,

Isosurface e.g.,

D, - (3

:

) contouring mapping,

color plot,

- height e.g.,

D, - (2

:

histogram) D,

- (1

:

3 2

R R

R R

R R

f

f

f

(5)

COLOR MAPPING

color look-up table

Associate a specific color with every scalar value

The geometry of Dv is the same as D

N )

if (N-i)f

c(

c

} {c C

i

,...N ,

i i

max min

2 1

Where

 

(6)

LUMINANCE COLORMAP

Use grayscale to represent scalar value

Luminance Colormap )

y -10(x4 4

e

f 

Most scientific data (through measurement, observation, or simulation) are intrinsically

grayscale, not color

Legend

(7)

RAINBOW COLORMAP

Red: high value; Blue: low value

A commonly used colormap

Luminance Map Rainbow Colormap

(8)

RAINBOW COLORMAP

Construction

f<dx: R=0, G=0, B=1

f=2: R=0, G=1, B=1

f=3: R=0, G=1, B=0

f=4: R=1, G=1, B=0

f>6-dx: R=1, G=0, B=0

(9)

RAINBOW COLORMAP

Implementation

void c(float f, float & R, float & G, float &B) {

const float dx=0.8

f=(f<0) ? 0: (f>1)? 1 : f //clamp f in [0,1]

g=(6-2*dx)*f+dx //scale f to [dx, 6-dx]

R=max(0, (3-fabs(g-4)-fabs(g-5))/2);

G=max(0,(4-fabs(g-2)-fabs(g-4))/2);

B=max(0,(3-fabs(g-1)-fabs(g-2))/2);

}

R

3

R : c

Dv D

: c

(10)

COLORMAP: DESIGNING ISSUES

Choose right color map for correct perception

Grayscale: good in most cases

Rainbow: e.g., temperature map

Rainbow + white: e.g., landscape

Blue: sea, lowest

Green: fields

Brown: mountains

White: mountain peaks, highest

(11)

RAINBOW COLORMAP

http://atmoz.org/img/weatherchannel_national_temps.png

(12)

EXP: EARTH MAP

http://www.oera.net/How2/PlanetTexs/EarthMap_2500x1250.jpg

(13)

EXP: SUN IN GREEN-WHITE

COLORMAP

(14)

EXP: CORONAL LOOP

http://media.skyandtelescope.com/images/SPD+on+CME+image+5+--+TRACE.gif

(15)

COLOR BANDING EFFECT

Caused by a small number of colors in a look-up table

(16)

CONTOURING

A contour line C is defined as all points p in a dataset D that have the same scalar value, or isovalue s(p)=x

} )

(

| {

)

( x p D s p x

C   

A contour line is also called an isoline

In 3-D dataset, a contour is a 2-D surface, called isosurface

(17)

CONTOURING

Cartograph

(18)

CONTOURING

One contour at s=0.11

S > 0.11 S < 0.11

Contouring and Color Banding

(19)

CONTOURING

7 contour lines

Contouring and Colormapping:

Show (1) the smooth

variation and (2) the

specific values

(20)

PROPERTIES OF CONTOURS

Indicating specific values of interest

In the height-plot, a contour line corresponds with the interaction of the graph with a horizontal plane of s value

(21)

PROPERTIES OF CONTOURS

The tangent to a contour line is the direction of the function’s minimal (zero) variation

The perpendicular to a contour line is the direction of the function’s maximum variation: the gradient

Contour lines Gradient vector

(22)

CONSTRUCTING CONTOURS

V=0.48

Finding line segments within cells

(23)

CONSTRUCTING CONTOURS

For each cell, and then for each edge, test whether the isoline value v is between the attribute values of the two edge end points (vi, vj)

If yes, the isoline intersects the edge at a point q, which uses linear interpolation

i j

i j

j i

v v

v v

p v

v q p

( ) ( )

For each cell, at least two points, and at most as many points as cell edges

Use line segments to connect these edge-intersection points within a cell

A contour line is a polyline.

(24)

CONSTRUCTING CONTOURS

V=0.37: 4 intersection points in a cell -> Contour ambiguity

(25)

IMPLEMENTATION: MARCHING SQUARES

Determining the topological state of the current cell with respect to the isovalue v

Inside state (1): vertex attribute value is less than isovalue

Outside state (0): vertex attribute value is larger than isovalue

A quad cell: (S3S2S1S0), 24=16 possible states

(0001): first vertex inside, other vertices outside

Use optimized code for the topological state to construct independent line segments for each cell

Merge the coincident end points of line segments originating from neighboring grid cells that share an edge

(26)

Topological State of a Quad Cell

Implementation: Marching Squares

(27)

Topological State of a hex Cell

Implementation: Marching Cube

Marching cube generates a set of polygons for each contoured cell:

triangle, quad, pentagon, and hexagon

(28)

CONTOURS IN 3-D

In 3-D scalar dataset, a contour at a value is an isosurface

Isosurface for a value corresponding to the skin tissue of an MRI scan 1283 voxels

(29)

CONTOURS IN 3-D

Two nested isosurface:

the outer isosurface is transparent

(30)

HEIGHT PLOTS

The height plot operation is to “warp” the data domain

surface along the surface normal, with a factor proportional to the scalar value

s

h s

D x

x n x s x

x m

D D

m

), (

) ( )

(

,

: 

(31)

HEIGHT PLOTS

Height plot over a planar 2-D surface

(32)

HEIGHT PLOTS

Height plot over a nonplanar 2-D surface

(33)

VECTOR VISULIZATION

Divergence and Vorticity

Vector Glyphs

Vector Color Coding

Displacement Plots

Stream Objects

Texture-Based Vector Visualization

Simplified Representation of Vector Fields

(34)

VECTOR FUNCTION

) D -

2 : case (simpler

D) -

3 in (usually

2 2

3 3

R R

f:

R R

f:

(35)

VECTOR VERSUS SCALAR

) , , (

) , , (

) , , (

V V V

) ,

, (

ˆ ˆ ˆ

: Vector

z y x

z y x f

z y x f

z y x f

V or

V V

V V

or

k V j

V i

V V

V

z y x z y

x

z y

x

) , , (

s : Scalar

z y x f s

s

(36)

EXAMPLE IN 2-D

 

 

 

 

 

 

 

 

 

x y )

, (

) , ( V V

: Vector

y x

y x f

y x V f

V

V

y

x

y x

s

e s

y x f s

y x

: exp

) , (

s : Scalar

) ( 2 2

(37)

GRADIENT OF A SCALAR

) (

) (

) (

2 2

2 2 2

2

2 2 2D

: Exp

) ,

, (

vector a

is scalar a

of Gradient

y x y

y x x

y x

y ye V s

x xe V s

e s

z s y

s x

s s V

 

 

 

 

 

(38)

GRADIENT OF A SCALAR

(1,1) (0,1),

(0,0), at

ector gradient v

the Draw

2 s

and 1,

s 0, s

line contour

Draw

1 1 2D :

Exp

 

 

 

 

y V s

x V s

y x

s

y x

(39)

DIVERGENCE OF A VECTOR

3D) in

volume and

2D in (area

Γ by enclosed

area the

is

| Γ

|

3D) in

surface closed

and

2D in curve (closed

ce hypersurfa closed

is Γ

ds n

V

V ( )

|

| lim 1

0

   

(40)

DIVERGENCE OF A VECTOR

Divergence computes the flux that the vector field transports through the imaginary boundary Γ, as Γ0

Divergence of a vector is a scalar

A positive divergence point is called source, because it indicates that mass would spread from the point (in fluid flow)

A negative divergence point is called sink, because it

indicates that mass would get sucked into the point (in fluid flow)

A zero divergence denotes that mass is transported without compression or expansion.

(41)

DIVERGENCE OF A VECTOR

x V x

V x

V

x y z

 

 

 

 V 

source :

divergence Positive

2 1

1 V

y) (x, V

: Exp

 

Free Divergence

0 0

0 V

x) (y, V

: Exp

 

sink :

divergence Negative

2 1

1 V

(-x,-y) V

: Exp

 

(42)

DIVERGENCE OF A VECTOR

(43)

VORTICITY OF A VECTOR

3D) in

volume and

2D in (area

by enclosed

area the

is

| Γ

|

3D) in

surface and

2D in (curve

ce hypersurfa closed

is

)

| (

| lim 1

0

V d s

V   

 

(44)

VORTICITY OF A VECTOR

Vorticity computes the rotation flux around a point

Vorticity of a vector is a vector

The magnitude of vorticity expresses the speed of angular rotation

The direction of vorticity indicates direction perpendicular to the plane of rotation

Vorticity signals the presence of vortices in vector field

(45)

VORTICITY OF A VECTOR

Color:

Glyph:

(46)

VECTOR GLYPH

)) (

,

( x x k V x l      

x

V

Vector glyph mapping technique associates a vector glyph (or icon) with the sampling points of the vector dataset

The magnitude and direction of the vector attribute is indicated by the various properties of the glyph: location, direction, orientation, size and color

(47)

VECTOR GLYPH

Line glyph,

or hedgehog glyph

Sub-sampled by a factor of 8

(32 X 32)

Original (256 X 256)

Velocity Field of a 2D Magnetohydrodynamic Simulation

(48)

VECTOR GLYPH

Velocity Field of a 2D Magnetohydrodynamic Simulation Line glyph,

or hedgehog glyph

Sub-sampled by a factor of 4

(64 X 64)

Original (256 X 256)

(49)

VECTOR GLYPH

Sub-sampled by a factor of 2

(128 X 128)

Original (256 X 256)

Problem with a dense Representation using glyph:

(1) clutter

(2) miss-representation

(50)

VECTOR GLYPH

Random Sub-sampling

Is better

(51)

VECTOR GLYPH: 3D

Simulation box: 128 X 85 X 42; or 456,960 data point 100,000 glyphs

Problem: visual occlusion

(52)

VECTOR GLYPH: 3D

Simulation box: 128 X 85 X 42; or 456,960 data point 10,000 glyphs: less occlusion

(53)

VECTOR GLYPH: 3D

Simulation box: 128 X 85 X 42; or 456,960 data point 100,000 glyphs, 0.15 transparency: less occlusion

(54)

VECTOR GLYPH: 3D

Simulation box: 128 X 85 X 42; or 456,960 data point 3D velocity isosurface

(55)

VECTOR GLYPH

Glyph method is simple to implement, and intuitive to interpretation

High-resolution vector datasets must be sub-sampled in order to avoid overlapping of neighboring glyphs.

Glyph method is a sparse visualization: does not represent all points

Occlusion

Subsampling artifacts: difficult to interpolate

Alternative: color mapping method is a dense visualization

(56)

VECTOR COLOR CODING

Similar to scalar color mapping, vector color coding is to associate a color with every point in the data domain

Typically, use HSV system (color wheel)

Hue is used to encode the direction of the vector, e.g., angle arrangement in the color wheel

Value of the color vector is used to encode the magnitude of the vector

Saturation is set to one

(57)

2-D Velocity Field of the MHD simulation:

Orientation, Magnitude

Vector Color Coding

(58)

2-D Velocity Field of the MHD simulation:

Orientation only; no magnitude

Vector Color Coding

(59)

VECTOR COLOR CODING

Dense visualization

Lacks of intuitive interpretation; take time to be trained to interpret the image

(60)

STREAM OBJECTS

Vector glyph plots show the trajectories over a short time of trace particles released in the vector fields

Stream objects show the trajectories for longer time intervals for a given vector field

(61)

STREAMLINES

Streamline is a curved path over a given time interval of a trace particle passing through a given start location or

seed point

point seed

the ,

) 0 (

) (

)

T]}

[0, ),

( {

0 0

p p

where

dt p

V

p

p S

t

 

(62)

Streamlines

All lines are traced up to the same maximum time T Seed points (gray ball) are uniformly sampled Color is used to reinforce the vector magnitude

(63)

STREAMLINES: ISSUES

Require numerical integration, which accumulates errors as the integration time increases

t V

p p

where

t i p V dt

p V

p

i i

i

t

t i

1 1

/

0

( )

0

( )

)

n integratio Euler

 

 

 

Euler integration: fast but less accurate

Runge-Kutta integration: slower but more accurate

Need to find optimal value of time step Δt

Choose number and location of seed points

Trace to maximum time or maximum length

Trace upstream or downstream

Saved as a polyline on an unstructured grid

(64)

Stream tubes

Tracing

downstream: the seed points are on a regular grid

Add a circular cross section along the streamline curves, making the lines thicker

(65)

Stream tubes

Tracing

upstream: the arrow heads

are on a regular grid

(66)

Stream Objects in 3-D

Input:

128 X 85 X 42

Undersampling:

10 X 10 X 10 Opacity 1

Maximum Length

(67)

Stream Objects in 3-D

Input:

128 X 85 X 42

Undersampling:

3 X 3 X 3 Opacity 1

Maximum Length

(68)

Stream Objects in 3-D

Input:

128 X 85 X 42

Undersampling:

3 X 3 X 3 Opacity 0.3

Maximum Time

(69)

Stream Objects in 3-D

Stream tubes Seed area at the

flow inlet

(70)

Stream Ribbons

Two thick

Ribbons Vorticity is color coded

Vector Glyth

(71)

STREAM RIBBONS

A stream ribbon is created by launching two stream lines from two seed points close to each other. The surface

created by the lines of minimal length with endpoints on the two streamlines is called a stream ribbon

(72)

STREAM SURFACE

Given a seed curve Γ, a stream surface SΓ is a surface that contains Γ and its streamlines

Everywhere tangent to the vector field

Flow can not cross the surface

Stream tube is a particular case of a stream surface: the seed curve is a small closed curve

Stream ribbon is also a particular case of a stream surface: the seed curve is a short line

(73)

TEXTURE-BASED VECTOR VIS.

Discrete or sparse visualizations can not convey

information about every point of a given dataset domain

Similar to color plots, texture-based vector visualization is a dense representation

The vector field (direction and magnitude) is encoded by texture parameters, such as luminance, color, graininess, and pattern structure

(74)

Vector magnitude:

Color

Vector direction:

Graininess

TEXTURE-BASED VECTOR VIS.

(75)

LIC principle: Line Integrated

Convolution Principle

TEXTURE-BASED VECTOR VIS.

function blurring

of width :

function blurring

or weighting :

P point seed

of streamline :

texture noise

: ) (

) (

) ( )) , ( ) (

(

2

L k(s) S(p,s) N

e s

k

ds s k

ds s k s p S p N

T

s

L L L

L

 

(76)

TEXTURE-BASED VECTOR VIS.

LIC is a process of blurring or filtering the texture (noise) image along the streamlines

Due to blurring, the pixels along a streamline are getting smoothed; the graininess of texture is gone

However, between neighboring streamlines, the

graininess of texture is preserved, showing contrast.

參考文獻

相關文件

QCD Soft Wall Model for the scalar scalar &amp; &amp; vector vector glueballs glueballs

• Emergent Z_k 1-form &amp; 2-form symmetry. BF theory

incapable to extract any quantities from QCD, nor to tackle the most interesting physics, namely, the spontaneously chiral symmetry breaking and the color confinement.. 

Rugged, high resolution, full-color, video-rate displays enable a multitude.

• Table 25.4 shows the usual symbols used in circuit diagrams... Resistors are color-coded for easy

Secondly, the key frame and several visual features (soil and grass color percentage, object number, motion vector, skin detection, player’s location) for each shot are extracted and

To improve the quality of reconstructed full-color images from color filter array (CFA) images, the ECDB algorithm first analyzes the neighboring samples around a green missing

The purpose of this paper is to achieve the recognition of guide routes by the neural network, which integrates the approaches of color space conversion, image binary,