Visualization Techniques -

Slides:



Advertisements
Similar presentations
M. Dumbser 1 / 23 Analisi Numerica Università degli Studi di Trento Dipartimento dIngegneria Civile ed Ambientale Dr.-Ing. Michael Dumbser Lecture on Numerical.
Advertisements

Differential calculus
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advanced Piloting Cruise Plot.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
Contents In today’s lecture we’ll have a look at:
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Topic 1Topic Q 1Q 6Q 11Q 16Q 21 Q 2Q 7Q 12Q 17Q 22 Q 3Q 8Q 13Q 18Q 23 Q 4Q 9Q 14Q 19Q 24 Q 5Q 10Q 15Q 20Q 25.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
Multiplying binomials You will have 20 seconds to answer each of the following multiplication problems. If you get hung up, go to the next problem when.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Lecture 5 3D Scalar Visualization Part One: Isosurfacing
SI23 Introduction to Computer Graphics
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
ENV Envisioning Information Lecture 12 – Scientific Visualization Scalar 2D Data Ken Brodlie
SI23 Introduction to Computer Graphics
5.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 5 – Drawing A Line.
7.1 Vis_04 Data Visualization Lecture 7 3D Scalar Visualization Part 2 : Volume Rendering- Introduction.
Data Visualization Lecture 4 Two Dimensional Scalar Visualization
GR2 Advanced Computer Graphics AGR
SI23 Introduction to Computer Graphics
GR2 Advanced Computer Graphics AGR
7.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 7 Polygon Shading Techniques.
9.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 9 Adding Realism Through Texture.
SI31 Advanced Computer Graphics AGR
ENGINEERING GRAPHICS 1E7
Solve Multi-step Equations
ALGEBRA TILES.
Evaluating Limits Analytically
Quadratic Equations and Problem Solving
Copyright © Cengage Learning. All rights reserved.
Chapter 4 Systems of Linear Equations; Matrices
ABC Technology Project
Copyright © Cengage Learning. All rights reserved.
Reconstruction from Voxels (GATE-540)
Copyright 2012, 2008, 2004, 2000 Pearson Education, Inc.
Quadratic Inequalities
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
Chapter 2: Frequency Distributions
Constant, Linear and Non-Linear Constant, Linear and Non-Linear
Functions, Graphs, and Limits
Chapter 5 Microsoft Excel 2007 Window
Squares and Square Root WALK. Solve each problem REVIEW:
© 2012 National Heart Foundation of Australia. Slide 2.
Graphing Ax + By = C Topic
Graphing y = nx2 Lesson
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Splines IV – B-spline Curves
Splines I – Curves and Properties
6.4 Best Approximation; Least Squares
Chapter 5 Test Review Sections 5-1 through 5-4.
Addition 1’s to 20.
25 seconds left…...
Polynomial Functions of Higher Degree
Chapter 2 Functions and Graphs
Week 1.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
PSSA Preparation.
1 Functions and Applications
Sections 5.1 & 5.2 Inequalities in Two Variables
Environmental Data Analysis with MatLab Lecture 21: Interpolation.
MA 1128: Lecture 06 – 2/15/11 Graphs Functions.
1 Sections 5.1 & 5.2 Inequalities in Two Variables After today’s lesson, you will be able to graph linear inequalities in two variables. solve systems.
Copyright © Cengage Learning. All rights reserved.
ENV Envisioning Information Lecture 11 – Scientific Visualization Introduction Scalar 1D Data Ken Brodlie
Interactive Graphics Lecture 10: Slide 1 Interactive Computer Graphics Lecture 10 Introduction to Surface Construction.
Presentation transcript:

Visualization Techniques - Data Visualization Lecture 3 Visualization Techniques - 1D Scalar Data 2D Scalar Data (part 1)

Visualization Techniques - One Dimensional Scalar Data

1D Interpolation -The Problem f 4 3 2 1 1.75 1 2 3 4 x Given (x1,f1), (x2,f2), (x3,f3), (x4,f4) - estimate the value of f at other values of x - say, x*. Suppose x*=1.75

Nearest Neighbour f 4 3 1.75 2 1 1 2 3 4 x Take f-value at x* as f-value of nearest data sample. So if x* = 1.75, then f estimated as 3

Linear Interpolation f x 4 3 1.75 2.5 2 1 1 2 3 4 x Join data points with straight lines- read off f-value corresponding to x*.. in the case that x*=1.75, then f estimated as 2.5

Linear Interpolation - Doing the Calculation Suppose x* lies between x1 and x2. Then apply the transformation: t = (x*-x1)/(x2-x1) so that t goes from 0 to 1. t=(1.75-1)/(2-1)=0.75 f(x*) = (1-t) f1 + t f2 The functions j(t)=1-t and k(t)=t are basis functions. OR, saving a multiplication: f(x*) = f1 + t ( f2 - f1 ) f(1.75)=0.25*1+0.75*3 =2.5 f(1.75)=1+0.75*(3-1) =2.5

Nearest Neighbour and Linear Interpolation Very fast : no arithmetic involved Continuity : discontinuous value Bounds : bounds fixed at data extremes Linear Interpolation Fast : one multiply, one divide Continuity : value only continuous, not slope (C0)

Drawing a Smooth Curve Rather than straight line between points, we create a curve piece x1 x2 f1 f2 We estimate the slopes g1 and g2 at the data points, and construct curve which has these values and these slopes at end-points g1 g2

Slope Estimation Slopes estimated as some average of the slopes of adjacent chords - eg to estimate slope at x2 g2 g2 usually arithmetic mean (ie average) of   = (f2-f1)/(x2-x1) f2   f1 f3 x1 x2 x3

Piecewise Cubic Interpolation Once the slopes at x1 and x2 are known, this is sufficient to define a unique cubic polynomial in the interval [x1,x2] f(x) = c1(x) * f1 + c2(x) * f2 + h*(d1(x) * g1 - d2(x) * g2) g1 f1 g2 ci(x), di(x) are cubic Hermite basis functions, h = x2 – x1. f2 x1 x2

Cubic Hermite Basis Functions Here they are: Again set t = (x - x1)/(x2 – x1) c1 (t) = 3(1-t)2 - 2(1-t)3 c2 (t) = 3t2 - 2t3 d1 (t) = (1-t)2 - (1-t)3 d2 (t) = t2 - t3 Check the values at x = x1, x2 (ie t=0,1)

Coal data - cubic interpolation

Piecewise Cubic Interpolation More computation needed than with nearest neighbour or linear interpolation. Continuity: slope continuity (C1) by construction - and cubic splines will give second derivative continuity (C2) Bounds: bounds not controlled generally - eg if arithmetic mean used in slope estimation...

Shape Control However special choices for slope estimation do give control over shape If the harmonic mean is used 1/g2 = 0.5 ( 1/1 + 1/2) then we find that f(x) lies within the bounds of the data

Coal data – keeping within the bounds of the data

Rendering Line Graphs The final rendering step is straightforward We can assume that the underlying graphics system will be able to draw straight line segments Thus the linear interpolation case is trivial For curves, we do an approximation as sequence of small line segments

Background Study Take the coal furnace data from lecture 2 Investigate how to present this as a graph in Excel (not easy!) After learning gnuplot in the practical class, create a graph of the coal data using gnuplot Look for Java applets on the Web that will create line graphs

Visualization Techniques Two Dimensional Scalar Data

2D Interpolation - Rectangular Grid Suppose we are given data on rectangular grid: f given at each grid point; data enrichment fills out the empty spaces by interpolating values within each cell

Nearest Neighbour Interpolation Straightforward extension from 1D: take f-value from nearest data sample No continuity Bounds fixed at data extremes

Bilinear Interpolation Consider one grid rectangle: suppose corners are at (0,0), (1,0), (1,1), (0,1) ... ie a unit square values at corners are f00, f10, f11, f01 f00 f10 f01 f11 How do we estimate value at a point (x,y) inside the square?

Bilinear Interpolation f00 f10 f01 f11 (x,y) (i) interpolate in x-direction between f00,f10; and f01,f11 (ii) interpolate in y-direction We carry out three 1D interpolations: Exercise: Show this is equivalent to calculating -f(x,y) = (1-x)(1-y)f00+x(1-y)f10+(1-x)yf01+ xyf11

Piecewise Bilinear Interpolation Apply within each grid rectangle Fast Continuity of value, not slope (C0) Bounds fixed at data extremes

Contour Drawing Contouring is very common technique for 2D scalar data Isolines join points of equal value sometimes with shading added How can we quickly and accurately draw these isolines?

An Example As an example, consider this data: -5 10 1 -2 Where does the zero level contour go?

Intersections with sides The bilinear interpolant is linear along any edge - thus we can predict where the contour will cut the edges (just by simple proportions) 10 -5 cross-section view along top edge 10 -5 -2 1

Simple Approach A simple approach to get the contour inside the grid rectangle is just to join up the intersection points Question: Does this always work? Try an example where one pair of opposite corners are positive, other pair negative 10 -5 -2 1