Spatial Data CS444 Chapter 8, VA&D - - PowerPoint PPT Presentation

spatial data
SMART_READER_LITE
LIVE PREVIEW

Spatial Data CS444 Chapter 8, VA&D - - PowerPoint PPT Presentation

Spatial Data CS444 Chapter 8, VA&D http://www.sci.utah.edu/~miriah/cs6630/lectures/L17-isosurfaces.pdf http://www.slate.com/blogs/future_tense/2013/12/06/ winter_storm_cleon_record_lows_us_weather_map_today_is_completely_insane.html Recap


slide-1
SLIDE 1

Spatial Data

CS444

http://www.slate.com/blogs/future_tense/2013/12/06/ winter_storm_cleon_record_lows_us_weather_map_today_is_completely_insane.html http://www.sci.utah.edu/~miriah/cs6630/lectures/L17-isosurfaces.pdf

Chapter 8, VA&D

slide-2
SLIDE 2

Recap

  • So far, we’ve studied methods to determine the

position of a data point on the screen

  • graph drawing, treemaps, scatterplots, PCA
  • However, some datasets come with very good

positional information

  • Wind maps, weather simulations, CT scans
slide-3
SLIDE 3

How do we represent spatial data?

  • In the real world, there’s

infinitely many data points in a weather map

  • In a computer, we only have

finite memory and finite time

  • How do we solve this

problem?

slide-4
SLIDE 4

Finite-dimensional function spaces

  • Some functions can be represented succinctly

2

  • 2

1 1 f(x) = ⇢ 1, if − 1

2 ≤ x ≤ 1 2

0,

  • therwise
slide-5
SLIDE 5

Finite-dimensional function spaces

  • Some functions can be represented succinctly

2

  • 2

1 1

f(x) =    1 + x, if − 1 ≤ x ≤ 0 1 − x, if 0 ≤ x ≤ 1 0,

  • therwise
slide-6
SLIDE 6

Finite-dimensional function spaces

  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-7
SLIDE 7

Finite-dimensional function spaces

  • Build complicated functions by sums of shifted,

scaled versions of these simple functions 2

  • 2

1 1

  • 1
slide-8
SLIDE 8

Finite-dimensional function spaces

2

  • 2

1 1

  • 1
  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-9
SLIDE 9

Finite-dimensional function spaces

2

  • 2

1 1

  • 1
  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-10
SLIDE 10

Finite-dimensional function spaces

2

  • 2

1 1

  • 1
  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-11
SLIDE 11

Finite-dimensional function spaces

2

  • 2

1 1

  • 1
  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-12
SLIDE 12

Finite-dimensional function spaces

2

  • 2

1 1

  • 1
  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-13
SLIDE 13

Finite-dimensional function spaces

2

  • 2

1 1

  • 1
  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-14
SLIDE 14

Finite-dimensional function spaces

2

  • 2

1 1

  • 1
  • Build complicated functions by sums of shifted,

scaled versions of these simple functions

slide-15
SLIDE 15

2

  • 2

1 1

  • 1

f(x) = X

i

ϕ(x − i)ci

ϕ(x)

slide-16
SLIDE 16

2

  • 2

1 1

  • 1

f(x) = X

i

ϕ(x − i)ci

sums shifts scales

simple functions

ϕ(x)

slide-17
SLIDE 17

Example: nearest-neighbor interpolation

2

  • 2

1 1 ϕ(x)

slide-18
SLIDE 18

Example: linear interpolation

ϕ(x) 2

  • 2

1 1

  • 1

Alternative formulation: f(x) = v0(1 − x) + v1x

slide-19
SLIDE 19

Cubic Interpolation

ϕ(x)

slide-20
SLIDE 20

Cubic Interpolation

ϕ(x) Alternative formulation:

What is “Correct” Interpolation?

slide-21
SLIDE 21

What is “Correct” Interpolation?

ϕ(x)

slide-22
SLIDE 22

Cubic, (etc) Approximation

http://www.cs.berkeley.edu/~sequin/CS284/IMGS/ makingbasisfunctions.gif

slide-23
SLIDE 23

Why go through this trouble?

  • Why not just define these functions “procedurally”?
  • At the end of the day they’re just arrays and if

statements, after all

  • Because we can do math on those sums more

easily

slide-24
SLIDE 24

Derivatives of finite- dimensional function spaces

f(x) = X

i

ciϕ(x − i) d f dx(x) = d dx X

i

ciϕ(x − i)

slide-25
SLIDE 25

Derivatives of finite- dimensional function spaces

f(x) = X

i

ciϕ(x − i)

d f dx(x) = X

i

d dxciϕ(x − i)

slide-26
SLIDE 26

Derivatives of finite- dimensional function spaces

d f dx(x) = X

i

ci dϕ dx (x − i)

f(x) = X

i

ciϕ(x − i)

slide-27
SLIDE 27
  • Derivatives are just another type of function

space where all we do is change the “simple function”

Derivatives of finite- dimensional function spaces

d f dx(x) = X

i

ci dϕ dx (x − i)

f(x) = X

i

ciϕ(x − i)

slide-28
SLIDE 28

Derivatives of finite- dimensional function spaces

ϕ(x) dϕ dx (x)

slide-29
SLIDE 29

Multidimensional functions

ϕ(x) Basis function for bilinear interpolation

f(x, y) = v00 (1 − x) (1 − y) + v10 (x) (1 − y) + v01 (1 − x) (y) + v11 (x) (y)

slide-30
SLIDE 30

Interlude: The Gradient of a Function

rf(~ x) =  @f/@x @f/@y

  • But what is that?
slide-31
SLIDE 31

Interlude: The Gradient of a Function

First we remember our friend the Taylor series: Now we ask ourselves: if we move a little away from , in what direction does grow the fastest? f (x0, y0) f ✓ x y ◆ = f ✓ x0 y0 ◆ + rf ✓ x0 y0 ◆T  x x0 y y0

  • + ε
slide-32
SLIDE 32

Interlude: The Gradient of a Function

f ✓ x y ◆ = f ✓ x0 y0 ◆ + rf ✓ x0 y0 ◆T  x x0 y y0

  • + ε

rf ✓ x0 y0 ◆T  dx dy

  • =

 ∂f/∂x ∂f/∂y T  dx dy

slide-33
SLIDE 33

Interlude: The Gradient of a Function

max  ∂f/∂x ∂f/∂y T  dx dy

  •  ∂f/∂x

∂f/∂y

  •  dx

dy

slide-34
SLIDE 34

Interlude: The Gradient of a Function

max  ∂f/∂x ∂f/∂y T  dx dy

  •  ∂f/∂x

∂f/∂y

  •  dx

dy

dx dy

  • = rf

|rf|

slide-35
SLIDE 35

Interlude: The Gradient of a Function

max  ∂f/∂x ∂f/∂y T  dx dy

dx dy

  • = rf

|rf|

The gradient points in the direction of greatest increase and its length is the rate of greatest increase

slide-36
SLIDE 36

Visualizing Scalar Fields

slide-37
SLIDE 37

Colormapping

  • “Default” strategy:
  • create color scale using

the range of the function as the domain

  • f the scale
  • create a position scale

to convert from the domain of the function to positions on the screen

  • set the pixel color

according to the scale

slide-38
SLIDE 38

Colormapping guidelines apply!

slide-39
SLIDE 39

Applies to “abstract” spaces too

http://www.nytimes.com/interactive/2015/04/16/upshot/ marriage-penalty-couples-income.html?abt=0002&abg=0

slide-40
SLIDE 40

Contouring: isolines

slide-41
SLIDE 41

Contouring: isolines

http://ryanhill1.blogspot.com/2011/07/isoline-map.html

slide-42
SLIDE 42

Contouring: isolines

How do we compute them?

slide-43
SLIDE 43

Contouring: isolines

http://ryanhill1.blogspot.com/2011/07/isoline-map.html

Approach to Contouring in 2D

  • Contour must cross every grid line connecting two

grid points of opposite sign

530 - Introduction to Scientific Visualization Oct 7, 2014,

Interpolate along grid lines

+

  • x

x

Get cell Identify grid lines w/cross Find crossings Primitives naturally chain together

slide-44
SLIDE 44

Cases

No Crossings Case Polarity Rotation Total x2 2 Singlet x2 8 x4 Double adjacent x2 4 x2 (4) Double Opposite x2 2 x1 (2) (x2 for polarity) 16 = 24

+

slide-45
SLIDE 45

Ambiguities

  • How to form lines?
  • How to form the lines?

x x x x

slide-46
SLIDE 46

Ambiguities

  • Right or Wrong?
  • Right or wrong?

x x x x x x x x x x x x

slide-47
SLIDE 47

Contouring: isolines