Download presentation
Presentation is loading. Please wait.
Published byValentine Cole Modified over 9 years ago
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
5
COLOR MAPPING color look-up table Associate a specific color with every scalar value The geometry of Dv is the same as D
6
LUMINANCE COLORMAP Use grayscale to represent scalar value Luminance Colormap 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 MapRainbow 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 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); }
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 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.11S < 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 (v i, v j ) If yes, the isoline intersects the edge at a point q, which uses linear interpolation 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: (S 3 S 2 S 1 S 0 ), 2 4 =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 128 3 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
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
35
VECTOR VERSUS SCALAR
36
EXAMPLE IN 2-D
37
GRADIENT OF A SCALAR
39
DIVERGENCE OF A VECTOR
40
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
43
VORTICITY OF A VECTOR
44
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 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
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 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.
76
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.