4 basic mapping techniques
play

4. Basic Mapping Techniques Mapping from (filtered) data to - PDF document

4. Basic Mapping Techniques Mapping from (filtered) data to renderable representation Most important part of visualization Possible visual representations: Position Size Orientation Shape Brightness


  1. 4. Basic Mapping Techniques Mapping from (filtered) data to renderable representation • Most important part of visualization • Possible visual representations: • Position • Size • Orientation • Shape • Brightness • Color (hue, saturation) • …. • Visualization, Summer Term 03 VIS, University of Stuttgart 1 4. Basic Mapping Techniques Efficiency and effectiveness depends on input data: • Nominal • Ordinal • Quantitative • Psychological investigations to evaluate the appropriateness of • mapping approaches Visualization, Summer Term 03 VIS, University of Stuttgart 2

  2. 4.1. Diagram Techniques Scatter plots: • Quantitative data • Accuracy in recognizing positions • 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.2 0.4 0.6 0.8 1 Visualization, Summer Term 03 VIS, University of Stuttgart 3 4.1. Diagram Techniques Scatter plots: visual recognition of correlations • Visualization, Summer Term 03 VIS, University of Stuttgart 4

  3. 4.1. Diagram Techniques Line graph: • Connection between points • 9660 5750 5740 9640 5730 9620 5720 5710 9600 5700 9580 5690 5680 9560 5670 9540 5660 0 5 10 15 20 25 30 Visualization, Summer Term 03 VIS, University of Stuttgart 5 4.1. Diagram Techniques Bar graph: • Discrete independent variable (domain): nominal/ordinal/quantitative • Quantitative dependent variable (data) • 9680 5770 5760 9660 5750 9640 5740 9620 5730 9600 5720 9580 5710 9560 5700 9540 5690 9520 5680 9500 5670 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Visualization, Summer Term 03 VIS, University of Stuttgart 6

  4. 4.1. Diagram Techniques Pie charts: • Quantitative data that adds up to a (fixed?) number • 0.252258892 0.645901961 0.265353929 0.614301398 0.450794846 0.467508703 Visualization, Summer Term 03 VIS, University of Stuttgart 7 4.2. Function Plots and Height Fields Visualization of 1D or 2D scalar fields • Ω ⊂ → I R I R 1D scalar field: • Ω ⊂ 2 → I R I R 2D scalar field: • Visualization, Summer Term 03 VIS, University of Stuttgart 8

  5. 4.2. Function Plots and Height Fields Function plot for a 1D scalar field • ∈ {( s , f ( s )) | s I R } Points • 1D manifold: line • Is interpolation meaningful? • Axis labeling • Annotations • Error bars • Gnuplot example Visualization, Summer Term 03 VIS, University of Stuttgart 9 4.2. Function Plots and Height Fields Function plot for a 2D scalar field • ∈ 2 {( s , t , f ( s , t ) | ( s , t ) I R } Points • 2D manifold: surface • Surface representations • Wireframe • Hidden lines • Shaded surface • Visualization, Summer Term 03 VIS, University of Stuttgart 10

  6. 4.2. Function Plots and Height Fields Wireframe representation • Requires specification of viewing parameters • Draw each edge of the grid • Visualization, Summer Term 03 VIS, University of Stuttgart 11 4.2. Function Plots and Height Fields Hidden line representation • Remove edges that belong to hidden faces • Better spatial orientation due to occlusion • Visualization, Summer Term 03 VIS, University of Stuttgart 12

  7. 4.2. Function Plots and Height Fields Shaded surface • Requires specification of lighting/shading model • Visualization, Summer Term 03 VIS, University of Stuttgart 13 4.3. Isolines Visualization of 2D scalar fields • Ω f : I R a Given a scalar function • c ∈ I R and a scalar value Isoline consists of points • = {( x , y ) | f ( x , y ) c } If f() is differentiable and grad(f) ≠ 0, • then isolines are curves Contour lines • Visualization, Summer Term 03 VIS, University of Stuttgart 14

  8. 4.3. Isolines Visualization, Summer Term 03 VIS, University of Stuttgart 15 4.3. Isolines Pixel by pixel contouring • Straightforward approach: scanning all pixels for equivalence with • isovalue Input • f : (1,...,x max ) x (1,...,y max ) � R • Isovalues I 1 ,..., I n and isocolors c 1 ,...,c n • Algorithm • for all (x,y) ∈ (1,...,x max ) x (1,...,y max ) do for all k ∈ { 1,...,n } do if |f(x,y)-I k | < ε then draw( x,y,c k ) Problem: Isoline can be missed if the gradient of f() is too large • (despite range ε ) Visualization, Summer Term 03 VIS, University of Stuttgart 16

  9. 4.3. Isolines Marching squares • Representation of the scalar function on a rectilinear grid • Scalar values are given at each vertex f ↔ f ij • Take into account the interpolation within cells • Isolines cannot be missed • Divide and conquer: consider cells independently of each other • Visualization, Summer Term 03 VIS, University of Stuttgart 17 4.3. Isolines Which cells will be intersected ? • Initially mark all vertices by + or – , depending on the • conditions f ij ≥ c , f ij < c No isoline passes through cells (=rectangles) which have the same • sign at all four vertices So we only have to determine the edges with different signs • And find intersection by linear interpolation • + + + + + + + + x c = [(f 2 -c )x 1 + (c-f 1 )x 2 ] / (f 2 -f 1 ) + c,x c – + + – + f 1 ,x 1 f 2 ,x 2 + – – – Visualization, Summer Term 03 VIS, University of Stuttgart 18

  10. 4.3. Isolines Only 4 different cases (classes) of combinations of signs • Symmetries: rotation, reflection, change + ↔ - • Compute intersections between isoline and cell edge, based on linear • interpolation along the cell edges - + + + + - + - ? + + + + + - - + ? + - + - - + - + Visualization, Summer Term 03 VIS, University of Stuttgart 19 4.3. Isolines We can distinguish the cases by a decider • Mid point decider • Interpolate the function value in the center • 1 = + + + f ( f f f f ) center i , j i + 1 , j i , j + 1 i + 1 , j + 1 4 If f center < c we chose the right case, otherwise we chose the left case • + - + - + - - + - + Not always correct solution • Visualization, Summer Term 03 VIS, University of Stuttgart 20

  11. 4.3. Isolines Asymptotic decider • Consider the bilinear interpolant within a cell • The true isolines within a cell are hyperbolas • Cell boundaries Asymptote Asymptote Visualization, Summer Term 03 VIS, University of Stuttgart 21 4.3. Isolines Interpolate the function bilinearly • = − − + − + − + f ( x , y ) f ( 1 x )( 1 y ) f x ( 1 y ) f ( 1 x ) y f xy + + + + i , j i 1 , j i , j 1 i 1 j 1 Transform f() to • = η − − + γ f ( x , y ) ( x x )( y y ) 0 0 γ is the function value in the • intersection point (x 0 , y 0 ) of the asymptotes Visualization, Summer Term 03 VIS, University of Stuttgart 22

  12. 4.3. Isolines If γ ≤ c we chose the right case, otherwise we chose the left one • + - + - + - - + - + Visualization, Summer Term 03 VIS, University of Stuttgart 23 4.3. Isolines Explicit transformation f() to • = η − − + γ f ( x , y ) ( x x )( y y ) 0 0 can be avoided Idea: investigate the order of intersection points either along x or y • axis Build pairs of first two and last two intersections • not possible valid Visualization, Summer Term 03 VIS, University of Stuttgart 24

  13. 4.3. Isolines Cell order approach for marching squares • Traverse all cells of the grid • Apply marching squares technique to each single cell • Disadvantage of cell order method • Every vertex (of the isoline) and every edge in the grid is processed twice • The output is just a collection of pieces of isolines which have to be post- • processed to get (closed) polylines Visualization, Summer Term 03 VIS, University of Stuttgart 25 4.3. Isolines Contour tracing approach • Start at a seed point of the isoline • Move to the neighboring cell into which the isoline enters • Trace isoline until • Bounds of the domain are reached or • Isoline is closed • Problem: How to find seed points efficiently? • In a preprocessing step, mark all cells which have a sign change • Remove marker from cells which are traversed during contour tracing • (unless there are 4 intersection edges! ) Visualization, Summer Term 03 VIS, University of Stuttgart 26

Recommend


More recommend