multi-dimensional data visualization 2csis.pace.edu/~marchese/cs397z/l4/l4.pdf · horizontal or...

38
Visual Computing Spatial Data

Upload: vanduong

Post on 03-Jul-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Visual Computing

Spatial Data

Page 2: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Graphical RepresentationsDimension Point Scalar Vector

2D 3D

1[1]{1}

1D Scatter Plot Line GraphHistogramBar Chart

2[2]{2}

2D Scatter Plot Contour PlotSurface ViewImage DisplayBounded Region Plot2D Histogram2D Bar Chart

2D Arrows2D Streamlines2D Particle Tracks2D Field Topology

3D Arrows in Plane

3 3D Scatter Plot IsosurfacesBasket weaveVolume Rendering

3D Arrows in Volume

n n-dimensional Scatter Plot

Brodlie, K.W., et al. (eds.) (1992). Scientific Visualization: Techniques and Applications. Berlin: Springer-Verlag.

Page 3: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Functional Notation - E(α,β) • E ( , ) - graphical entity

� α, the type of data model� β, the dimensionality of the variable domain.

• E (P, 3) is a set of P points in three dimensions. – For scalars, vectors, and tensors, P is replaced with S, V, and T, respectively.

e.g. E(S,1) is a 1D scalar entity characterized by a line graph (e.g. y = mx + b). • The dimensionality of the vector may be given by following the

symbol with :n– E(V:2,2) is a two dimensional vector entity defined over two independent

variables.• The domain specification (β) may be refined into three cases:

1. Graphical entity is defined a series of points over a continuous domain. – e.g, in a surface plot a height is defined for each sampled x,y location.

1. Graphical entity is defined over regions of a continuous domain - E(α,[β])– e.g. a map that shows population density for bounded regions where the brackets

represent regions instead of points - E(S,[2]) would represent population density.1. Graphical entity is defined over an enumerated set - E(α,{β})

– e.g. number of computers sold by different manufacturers during a year. – E(S,{1}) represents the computer sales by manufacturer.

Page 4: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

1D• Two kinds of plots: scatter plots and scalar plots. • 1D scatter plot - E(P,1) • Results when marks are placed along a line. • The placement of a marker at a location is a

consequence of the answer to the following question: – Does the datum fall at this position? – If the answer is yes, a marker is set; if it is no, a marker

is omitted.

Page 5: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

1D Scatter Plot Examples• E(P,1) - positions measured from a point of reference

– e.g. the distances of planets from the sun

• E(4P,1) - 46 nucleic acid sequence of the protein crambin – rectangles of varying heights and colors. – Each of the four rows corresponds to a different method for secondary structure

prediction. – Helix regions are largest and colored blue, sheet amino acids are smaller and

colored yellow, while turns are the narrowest and colored green. – Both rectangles and letters are glyphs.

• Glyphs are objects that have their attributes, such as size, shape, color, or texture, adjusted based on the characteristics of the data they represent.

Page 6: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Gel Electrophoresis

• Used in DNA analysis• Separates molecules by charge and weight

Page 7: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Music Animation Machine

• Good for visualizing music during serial playback, relate audio to visual structure

• Visualizing entire compositions: increase information density• See patterns of phrases, instruments, etc.

http://www.kunstderfuge.com/theory/malinowski.htm http://www.musanim.com/all/

Page 8: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Donald JuddProgression, 1978

• Judd based his work on simple mathematical formulae, in order to avoid subjective, 'expressive' qualities.

• 'Reading' this sculpture from left to right, the steel blocks decrease by just under half their size, while the spaces between them do the same, but in reverse.

• The smallest space and the smallest solid have the same dimensions.

© Judd Foundation. Licensed by VAGA, New York/DACS, London 2004

Page 9: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

1 D Scalar Plot• One dimensional scalar data arises from sampling some function f(x1). • The plotted data arises from asking the following question: what is the value of the

datum at this location as we traverse the path x1?• Data are plotted in three possible ways: • Line graph, E(S1)

– Arises from a set of data points that have been collected over an interval of a continuous function.

– A line is drawn through the data points to visualize the original function f(x1). • Histogram, E(S[1])

– Defined over regions of the line. – The interval domain x0→xn of the underlying continuous function is broken down into

bins or buckets. – Each bucket represents a segment of the interval xn to xn+1. A data element is associated

with a bin if it falls within the range. – Histograms display the number of elements in each bin by drawing bars of corresponding

heights.• Bar chart, E(S{1})

– Created by defining a set of entities and displaying their relative values by drawing horizontal or vertical bars. (Variation - pie chart )

Page 10: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Sequence Logo• Devised by Thomas Schneider and

coworkers at the National Cancer Institute

• Constructed from analysis of the aligned DNA sequences

• At each position in the aligned sequence the frequency of a base’s appearance is computed.

• This value is used to vertically scale the nucleotide’s symbol.

• These glyphs are then stacked in the order of each letter’s importance (most important on top). A standard deviation error bar is added to each stack, representing the error in the entire stack.

Page 11: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

2D Scatterplots, E(P,2)

• Arise when pairs of data values are represented as points in a plane.

• A yes/no decision is made for plane locations x1, x2.

Page 12: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

2D Scalar plots, E(S,2)• Created when data is sampled from a two dimensional function f(x1, x2). • Scalar value may be represented as 2D bar charts, histograms, images, contour,

and surface plots. • Two dimensional scalar plots begin with a function that is defined as a series of

segments over the continuous domain. • Ubiquitous example - height field.

– A height field is generated by measuring the height of a point above a ground plane position.

– Relief maps are created in this way. – Ideally, data are sampled at equal intervals across the grid. – For non-uniformly distributed data the surface must be smoothed out over the

surface between regularly sampled points. • Done by a bilinear interpolation between data values.• In order to maintain higher continuity, bicubic interpolation is invoked. • For scattered data, bilinear and bicubic interpolation and triangulation

methods are used.

Page 13: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

E(S,2) - Contour line plotIsolines - A set of data values at positions in a two dimensional plane are employed

as guide points for placing lines of constant numerical value.

Topographic mapmolecular electron density

Page 14: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

E(S,2) - Contour line plotDiscrete shaded contour line - arises from filling in areas between the line styles.

Page 15: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

E(S,2) – Surface Plots

Without hidden line removal (HLR) With HLR With HLR and surface coloring

sin(x)cos(y) surface mesh

Polygons with HLR and surface shading Polygons with HLR and surface shading, & grid

Page 16: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

2D Bar charts, E(S, {2})

Deslandes table for a vibrational band system in a polyatomic molecule. Size of the black dot indicates the intensity of a particular transition.

Periodic table in which the atomic radius of each elemental compartment is color coded by size.

Page 17: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Choropleth Map (bounded region plot), E(S,[2])

• Displays density data, over a set of regions

• Dupin, Baron Pierre Charles, 1826

• Cartogram, map with shadings from black to white (distribution and intensity of illiteracy in France), the first (unclassed) choropleth map, and perhaps the first modern statistical map.

Page 18: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Cartogram Map

Cartogram showing Open Europe estimate of total European Union net budget expenditure in euros for the whole period 2007-2013 per capita, based on Eurostat 2007 population estimates (Luxembourg not shown).

A cartogram is a map in which the geometry or space of the map is distorted in order to convey the information of this alternate variable.

Page 19: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

2DVector Plot, E(V,2)

Page 20: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

3D Scatterplot E(P,3) • Created when triplets

of coordinates x1, x2, x3 mark a position in a three dimensional volume

• Biggest problem - clutter

Page 21: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

3D Scalar Plots, E(S,3) • Created from sampling a function f(x1, x2, x3). • Data is supplied at each point of a regular lattice

in three dimensions. • Volume Visualization - general class of methods

employed for viewing this data. • Three techniques generally used:

1. Slicing volume with cut planes2. Isosurfaces - surfaces of constant value within the

volume3. Direct Volume rendering - attempts to display

directly the volume’s characteristics.

Page 22: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

3-D Data• Voxel volume data• A voxel (volumetric pixel or, more correctly, Volumetric Picture

Element) is a volume element, representing a value on a regular grid in three dimensional space. – Fully sampled contents of 3D objects– Voxel = 3D pixel; point in a 3D image– E.g: Visible Human, MRI, CaT scan

• Visible Human» slice and photograph

• MRI & CaT:» Measures tissue density at each point in space

2-D:

3-D:

Page 23: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Slicing• Visible Human

Explorer

• C. North, B. Shneiderman, C. Plaisant. User Controlled Overviews of an Image Library: A Case Study of the Visible Human.Proc. of ACM Digital Libraries '96 Conf, ACM Press, 1996.

http://www.nlm.nih.gov/research/visible/applications.html

Page 24: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Slices• 2D slices are a simple method of extracting two dimensional data (suitable for displaying

on a graphical workstation) from a three dimensional data set. – The method is simple -- a plane through the data set is specified (it may be orthogonal, that is,

parallel to an axis of the data set, or arbitrarily oriented) and the data points at the intersection of this plane and data set are displayed on the plane.

– The plane may be displayed orthogonally on the screen or more commonly in its actual orientation in the 3D space.

• Slices overcome in a simple fashion the inability to see an entire cube of data at once. – They are often an extremely good way to get a first impression of a data set, and an animation

which steps through all the slice planes is also very useful. • Slices are applicable to density data, making it easy for a human to interpret the visual

image of the slice. • Caution must be exercised when attempting to understand how the different slices relate.

– Simply stepping through the slices is reasonable, but often requires a good deal of concentration to comprehend what is seen.

– Sometimes switching the slice to be perpendicular to its current position helps to show the context of the original slice.

– The logical extension to this is to have more than one slice, each mutually perpendicular. This provides the desired context, and each slice supports the others in the user's comprehension of the data set.

• The major downside to this method is that it is often easy for the slices to obscure one another, which limits the amount of the slices that can be easily observed

Page 25: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Isosurfaces• Created by launching a probe

through the three dimensional data array that represents the volume, to search out and tag array locations which correspond to the data values of interest.

• Tagged points are fitted to smooth curves or geometric primitives, such as triangles, and rendered accordingly (e.g. wireframe, surface).

Wireframe model of the electron density envelope surrounding the benzyl cation, and its corresponding solid surface enhanced by mapping an electrostatic potential onto the surface.

2D scalar field, E(S,2), is color coded to represent regions of high (blue) and low (red) potential.

Page 26: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Isosurface Generation: Marching Cubes

Idea:• create a triangular mesh that will approximate the

iso-surface• calculate the normals to the surface at each vertex

of the triangleAlgorithm:• locate the surface in a cube of eight pixels• calculate normals• march to the next cube

William E. Lorensen, Harvey E. Cline: Marching Cubes: A high resolution 3D surface construction algorithm. In: Computer Graphics, Vol. 21, Nr. 4, July 1987

Page 27: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Surface intersection in a cube• assign ZERO to vertex

outside the surface• assign ONE to vertex

inside the surface

Note:Surface intersects those cube edges where one vertex is outside and the other inside the surface

Page 28: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Surface intersection in a cube• There are 28=256 ways the surface may intersect the cube• Triangulate each caseNote: using the symmetries reduces those 256 cases to 15 patterns

Page 29: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Surface intersection in a cube• Create an index for each case:

• Interpolate surface intersection along each edge

Page 30: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Calculate normals• Calculate normal for each

cube vertex:• Interpolate the normals at

the vertices of the triangles:

Page 31: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

IsosurfacesAdvantages • Fully three dimensional, and so can provide a good deal of spatial

context. Disadvantages • As the surface is opaque (yet infinitesimally thin), internal structure

is often lost, and thus is better suited to monotonic data, where all the points inside the (assumed closed) isosurface have values larger (or smaller) than that on the surface.

• Isosurfaces can be difficult or misleading to interpret. • Isosurfaces can be difficult to color meaningfully. Colouring based

on the density is mostly fruitless, as it results in a monochromatic coloring of the surface.

Page 32: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Direct Volume Rendering• A direct volume renderer requires every sample value to

be mapped to opacity and a color. • This is done with a "transfer function" which can be a

simple ramp, a piecewise linear function or an arbitrary table.

• Once converted to an RGBA (for red, green, blue, alpha) value, the composed RGBA result is projected on correspondent pixel of the frame buffer.

• The way this is done depends on the rendering technique.

Page 33: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Direct Volume Rendering

Mouse skull (CT) rendering

Page 34: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Ray Casting• Volume ray casting, sometimes called volumetric ray casting, is an image-

based volume rendering technique that computes 2D images from 3D volumetric data sets.

Page 35: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Ray Casting ProcedureFour steps: 1. Ray casting. For each pixel of the final image, a ray of sight is shot ("cast") through the volume. 2. Sampling. Along the part of the ray of sight that lies within the volume, equidistant sampling points or

samples are selected. 3. Shading. For each sampling point, a gradient is computed that represents the orientation of local surfaces

within the volume. The samples are then shaded, i. e. colored and iluminated, according to their surface orientation and the source of light in the scene.

4. Compositing. After all sampling points have been shaded, they are composited along the ray of sight, resulting in the final color value for the pixel that is currently being processed.

• The composition is derived directly from the rendering equation and is similar to blending acetate sheets on an overhead projector. It works back-to-front, i. e. computation starts with the sample farthest from the viewer and ends with the one nearest to him. This work flow direction ensures that masked parts of the volume do not affect the resulting pixel.

Page 36: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Flow Visualization• Streamlines

Page 37: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Flow VisualizationLine Integral Convolution (LIC)• LIC (Line Integral Convolution) is a well-known texture synthesis technique proposed by

Cabral and Leedom in 1993. • It employs a low-pass filter to convolve an input noise texture along pixel-centered

symmetrically bi-directional streamlines to exploit spatial correlation in the flow direction.

• LIC provides a global dense representation of the flow, analogous to the resulting pattern of a tract of wind-blown sand

Page 38: Multi-Dimensional Data Visualization 2csis.pace.edu/~marchese/CS397Z/L4/L4.pdf · horizontal or vertical bars ... • Scalar value may be represented as 2D bar charts, histograms,

Line Integral Convolution (LIC)