VIS review: Lecture 1: introduction The use of data visualization Help understand the data. High performance computing generates vast quantities of data The definition of data visualization Data derived form the observation to reality and simulation to reality is represented as the form of the images and animation. Application Visual programming systems A sequence of simple processing steps; system provides modules implementing simple steps in a visualization pipeline; connect modules together. Web-based visualization Client-side: java applet Server-side: run VIS system and return to client as VRML Lecture 2: reference model and 1D scalar data Reference model: Observation data Experimental data images, animation, sound, text Simulation data The visualization process Step 1: Data enrichment: interpolating (sparse and accurate), or approximating (sparse but in error) raw data-effectively creating a model Step 2: mapping: conversion of data into a geometric representation Step 3: rendering: assigning visual properties to the geometric object and creating an image. General classification scheme F(x): the independent variable x: x= (x1, x2, … xn) The dependent variable F: F= (F1, F2, … Fm) The dimension is n, and the dependent variable can be scalar (m=1) or vector (m>1) Question: What means Ens/v ? Lecture 2-8: Visualization techniques One-dimensional scalar data 1. Nearest neighbor 2. Linear interpolation X* is between X1 and X2; t= (X*-X1)/(X2- X1), t ~ [0,1] So f (X*) = (1-t) f1 + t f2 f (X*) = f1 + t (f2 – f1) 3. Piecewise cubic interpolation Only be used when the slope continuity is needed The slopes g1 and g2 may be given, or if not, then estimated: the slopes of adjacent chords, usually arithmetic mean (average) of Δ1, Δ2. Δ1= (f2-f1)/(x2-x1) F(x) = c1(x)*f1 + c2(x)*f2 + d1(x)*g1 + d2(x)*g2, where ci(x), di(x) are cubic Hermite basis functions. Harmonic mean (g2): incline to the smaller number, the equation: 1/g2 = 0.5 (1/Δ1 + 1/ Δ2) e.g. arithmetic mean: (1+11)/2=6; harmonic mean: 0.5 (1 + 1/11) = 6/11 11/6 = 1+5/6 to control the shape of spline Question: what means “bounds” in 1D scalar interpolation? Two-dimensional scalar data Contouring regular grid data 1. Nearest neighbor interpolation 2. Bilinear interpolation Within a unit square (0, 0) and (1, 1) (i) f (x,0) = (1-x) f00 + x f10 (ii) f (x, 1) = (1-x) f01 + x f11 (iii) f (x, y) = (1-y) f (x, 0) + y f (x, 1) Formula: f (x, y) = (1-x)(1-y) f 00 + x (1-y) f 10 + y (1-x) f 01 + xy f 11 Tracking contours 3. Saddle point Opposite vertices same sign, two +ve, two –ve Calculate saddle point: Derivative: fx’ = fy’ = 0, max in one direction, min in other Where: fx’= σf (x, y)/ σx = - (1-y) f00 + (1-y)f10-y f01 + y f11 ∴x = (f00-f01)/D; y = (f00-f10)/D; and D = f00 + f11 - f01 -f10 Saddle value = (f00 f11 - f01 f10)/D F(x, y) =0 Example: Say: f 00 = -3; f11 = -5 f01 = 10; f10 = 1 Saddle point= 5/19 (the red point) F(x, y) =0 4. Greater accurate: The tangent of the arc Use shoulder point to get the point that the tangent line passes Contouring scattered data Tessellation: 1. Dirichlet tessellation: Steps: (assume Q is the new point) a. Determine polygon containing Q-here P3 b. Construct perpendicular bisector of P3Q and find intersection with D3 –this becomes point of modified tessellation c. Determine adjacent polygon –here D2 d. Repeat the above two steps until D3 is reached again, or there is no intersection e. Remove all vertices and edges interior to the new polygon 2. Delaunay tessellation: Triangulation formed by joining points whose ‘territories’ share a common boundary in the tessellation. Its nice property is to avoid long-skinny triangles ‘Empty circle’ property of the Delaunay tessellation: every circle not cover more than three point. Other 2D techniques 1. Interpolation in a triangle Linear rather than bilinear, can construct linear interpolation f (x, y) = a + bx + cy 2. An alternative for contouring on rectangular grids Average = (f00 + f11 + f01 + f10)/4 is the value of the geometry center 3. Smooth contouring with bicubic interpolation: too complex /* 2D 3D */ 4. Surface views: 5. Image plots 6. Cross sections: Fix y, and look at f in terms of just x; and then repeat for different y. simplify the Es2 problem Question: What is ‘Tracking contours’? Three-dimensional scalar data (Volume visualization) Surface extraction: 1. Slicing: 3D --> 2D 2. Isosurface: a surface of constant value Direct volume rendering: The volume is modelled as a semi-transparent ‘jelly’, where the colour and opacity of the jelly varies and reflects the scalar value at any point. Isosurface Data enrichment 1. Nearest neighbor interpolation 2. Trilinear interpolation Formula: f (x, y, z) = (1-z) f xy0 + z f xy1 3D --> 28 arrays --> 15 topologically distinct configurations Marching cubes algorithm Step 1: classify the eight vertices relative to the Isosurface value (encode), if the vertex of cell has greater or less than Isosurface value Step 2: look up table, which identifies the 15 canonical configuration which means the basic surface topology Step 3: inverse linear interpolation along the identified edges will locate the intersection points Step 4: the canonical configuration will determine how the pieces of the Isosurface are created (0, 1, 2, 3 or 4 triangles) Step 5: pass triangles to renderer for display Ambiguities 1. Ambiguities on faces Similar to 2D ambiguities, be resolved by the saddle point on the face: Which sub-case is chosen depends on the value of the saddle point on the face 2. Interior ambiguities: Decided by value at body saddle point: saddle point: fx = fy = fz =0 3. Marching tetrahedral: too much triangles are created--> slowing down the rendering time Isosurface rendering Generate a triangular mesh surface In visualization it is enough just to consider diffuse reflection - This gives a dull effect - Light is scattered evenly and gives the colour of the surface Rendering of Isosurface Key is the estimation of vertex normals for Gouraud shading 1. One possibility is to construct the entire surface, then assign vertex normals as average of normals of surrounding triangles 2. Surface normal is equal to the gradient vector of f (preferred) Volume rendering A different mapping technique for 3D scalar data, compared to isosufacing. The volume render pipeline: Segmentation --> gradient computation --> interpolation --> classification --> shading --> compositing Segmentation: done before the actual rendering to label all the voxel. Gradient computation: to find the boundaries between the different materials depended on the how quickly the data changes. The boundaries between materials are of key importance (I) Calculate αas above (II) Scale by gradient of function to highlight boundaries α* = α|grad f |, grad f = (df/dx, df/dy, df/dz) Gradient is a 3D vector, f = [x, y, z] the direction indicates the orientation of a structure, and the magnitude |grad f| tells how quickly data changes. Data classification: 1. Opacity transfer function: Histogram of CT numbersX-ray absorptionsassign materialopacity classification Constructing the Gel-CT data Binary segmented data 2. Colour transfer function: If the classification is done at the vertices, there is a choice: 1. Gouraud-type 2. Phong-type Interpolation: 1. Classify-interpolate: classification as pre-processing, smoothing effect obscure detail, classification is independent to the viewpoint The danger of this method: opacity-weighted color interpolation 2. Interpolate-classify: classification within the inner loop of ray casting, get fine detail Compositing: Ray casting: Composite the samples along a ray: 1. Back to front 2. Front to back: advantage is: if the accumulated opacity reaches 1.0, the process will be stopped. (early ray termination) The speed up method: maximum intensity projection (MIP) To the performance rather than accuracy Texture-based: Draw from back-to-front Select slices perpendicular to this direction Simpler solution-2D texture mapping - View volume as set of slices parallel to coordinate planes The speed up method: 1. Shear warp rendering: project front-to-back to get intermediate “sheared object space”, then warp image 2. Splatting: Fuzzy balls around each voxel Question: The third step of marching cubes algorithm? What means “If the classification is done at the vertices, there is a choice”? What means the advantages of ray-casting, binary classification, binary decision? Lecture 9: what makes a good visualization? The principle includes: 1. Easy to understand—get message across 2. Different things shown Time Direction/pass time of troops Temp No. Of soldiers 3. Enable comparison 4. Show causality 5. Display multivariate data 6. Integrate multimedia 7. Show scale explicitly: Good labelling/scale information 8. Preserve quality, relevance, and integrity of the data Lecture 9-11: visualizing flow: Experimental techniques: The distinction between steady and unsteady (time-dependent) flow Experimental techniques (Particle tracing): 1. Time lines: perpendicular to the direction of velocity Line connecting particles that have been released at the same time 2. Streak line: a line joining the positions, at an instance in time, of all particles that have been previously released from a seed location. It can be simulated by releasing particles continuously from the seed locations at each time step. 3. Path line: The trajectory of a single particle released from one fixed location, seed location. 4. Streamline: a filed line tangent to the velocity field at an instance in time 5. Fixing tufts: the flow past a fixing point Computer flow visualization: Scalar techniques: 1. Speed =sqrt (vx2 + vy2 + vz2) 2. Arrows: Particle traces (particle advection) Trajectories traced by fluid particles over time Steps: Find cell containing initial position Determine velocity at current position (interpolation) Calculate new position (integration) Find the cell containing new position (point location) The trace is (x(t), y(t), z(t)) Vx = dx/dt; Vy = dy/dt; Vz = dz/dt; Ordinary Differential Equations (ODEs): X(0), Y(0), Z(0) Seed point: initial position (x0, y0, z0) Simplest method, Euler’s method: dx/dt = (x(t+Δt)-x(t))/Δt=Vx (Ρ(t)), whereΡ(t)=(x, y, z) ∴x(t+Δt) = x(t) +Δt.Vx(Ρ(t)), similarly for y(t) and z(t) (x1, y1, z1) The velocity of new position (x1, y1, z1) is calculated by interpolation (bilinear) Improving the integrating: If the Vx* is the velocity of original distinct, average the Vx and Vx* is the better velocity of distinct, new Vx*. This is just the 2nd order – the 4th order method is more accurate Another source of error: interpolation to calculate the velocity of current position Rake of seed: points, line, circle even an area. Streamline Streamline is everywhere tangential to the flow To reader streamlines, - Stream ribbons: as a thin flat ribbon - Tube: Stream surface Basic approach Surface has parameters s (streamline) and t (timeline): where: (s, t), 0<s<1; 0<t<N 1. Regularly spaced seed points at t = t0: (si, 0), I=0, 1, …K; si = i/K 2. Compute each streamline to create points on time lines: (si, 0), (si, 1),…(si, N), I=0, 1, …K 3. This forms polygonal mesh which can be rendered- but need to allow for dynamic behavior Tiling the surface: 1. Regular tiling (simplest): 2. Greedy tiling: on a highly sheared flow Diverging flow 1. Current quadrilateral has width greater than twice its height 2. Near an obstacle Converging flow Two abutting quadrilaterals on adjacent ribbons- if 6 points nearly coplanar and height greater than combined width Stream flow visualization: Streamline and stream surface: better for flow direction Particle traces: better for flow speed Unsteady flow visualization Velocity depends on time Different types of grid Curvilinear grids: Texture-based methods: visualize flow as a texturing effect Spot noise: Aligning the shape of the spot with the direction of flow to give a good visualization effect In direction of flow, scale to (1+ |v|), |v| = the velocity magnitude At 90 degrees to flow, scale to 1/(1+|v|) Line integral convolution (LIC) Essence of method is: - Consider a white noise texture: T(x,y) - For each pixel, set its intensity as a function (e.g. average) of values of T along a short streamline segment through the pixel - This has effect of correlating the resulting pixel values along streamlines, so a sense of the flow direction is obtained. Original LIC oriental LIC to indicate the orientation, by using a sparse texture and a weighting of samples along streamline Vector field topology To visualize the significant features of a flow field Critical points: 1. Velocity magnitude is zero; 2. Point of repulsion, attraction or a saddle point 3. Streamlines from critical points divide space into regions of similar behavior Charactering a critical point Say u: Vx; V: Vy Eigenvalues of Jacobian matrix: a1 + ib1, a2 + ib2 - Repulsion a1, a2 position - Attraction a1, a2 negative - Saddle a1, a2 opposite signs - Center a1, a2 zero Imaginary part - No rotation b1, b2 zero - Rotation b1, b2 non-zero Attachments are the start point, and detachment points are end points * The flow field topology is produced by: a. identifying the critical points b. Drawing streamlines from detachment or attachment points and saddle points… to repulsors and attractors c. Drawing streamlines to/from critical points that exit boundary Question: 1. What means numerical techniques for integrating the ODEs? 2. The relation between streak line, streamline and particle trace, same each other? 3. How to select the next point, when tiling the stream surface? 4. What means ‘height’ and ‘width’ in the converging flow? 5. What means Jacobian matrix? 6. What means the ‘curvilinear grids’? Lecture 12 & 14: VRML and via Web Web browser has become the universal user interface 1. Presentation of data-publishing visualization 2. Analysis of data- performing visualization Publishing visualization (lecture 12) VRML Coordinate system Hierarchical structure: VRML scene graph Instance: can be used multiple times Anchors: link Textures Lights Viewing Making world come active Sensors and events 1. Sensor is a type of node that generates data within the world 2. Data generated within a node is called an event, which are routed from one node to another to program behavior 3. Sensor can active an animation by routing event to an animation engine Sensor: time sensor, proximity sensor-collision detection Performing visualization (lecture 14) Two distinct application: 1. For the scientist, to gain a visualization of their own data 2. For the general public, to gain a visualization of data published by someone else Players: User Visualization service provider Data provider: either the user themselves, or an independent agency, or the visualization service provider Architectures: Client-side software and compute The visualization software is installed on client. User enters data source on form; data transferred to users with a MIME type that invokes a particular helper application. 1. Data as MIME-type: Data is of a unique type Data is downloaded to a Web browser as MIME-type, whereupon the software is invoked. 2. Script as MIME-type: More general application To download over the web not just the data, but also a script to define how the data should be processed. Server-side software and compute Server provides both software and processing power User enters data sources, and style of visualization on form service runs visualization software and returns picture to use. The limitation of server-side on form: restrictive interface server-side on Java applet (group several key into one which is used by client) How to create a Java applet to control the visualization software: #1: Take a dataflow network (map) combine modules with key interface widgets into a ‘group’ save the resulting map #2: ibulder: Input saved map constructs a Java applet, which replicate the group interface, plus an HTML wrapper complier applet outputs web page with embedded applet How to use: User downloads page enters parameters submitted to IRIS Explorer map running on server VRML returned to browser Server software and client compute User downloads a Java applet from the visualization service; security restriction affect data input (applet only reads from its own file store (a file on the host which the applet was loaded)); Data is from two sources: local data, data at a URL. Software is transferred across the web to the client, rather than being pre-installed. Collaborative web-based visualization Data --> filter --> Map --> Render --> image Selective share using: master and slave The visualization is fixed by the parameters entered in the form, so adding an audit facility to store the form parameters, then a collaborator can pick up from the point reached. The tree is used to collaborative visualization over the web. The threads represent different exploration path, every user in the same group sees current tree - Clicking on the node retrieves a stored form - New form setting can be stored as new nodes on tree Lecture 13: high dimensional visualization Scalar visualization: - 1D – graphs - 2D – contouring, surface views - 3D – isosurfaceing, volume rendering - 4D – animation a 3D technique or ?? Question: what means hyper slice? Lecture 13: overview of major systems The major systems: AVS, IRIS explorer, IBM Open Visualization Data Explorer, and pV3 The major toolkit: Visualization Toolkit IRIS explorer: Create own modules, mbuilder tool creates a wrapper around own code Computation steering: Control simulate visualize render Scripting-Skm Be driven by GUI, command line interface, which can be grouped as a “script” Be run in batch mode or by another application Distributed computing Remove the intensive computation or share the result 1. Computation remotely: install explorer on remote machine using ‘Hosts’ or ‘New Host’ menu give access to librarian for explorer select module or map as required 2. Render remotely: not require explorer to be installed Lecture 15: Visualization of very large datasets Key is to sort cells in advance, according to value, in order to reduce the number of cells which should be calculated—presorting Active cell: To tell if the Isosurface with threshold T passes through this cell, we must compare minimum and maximum to T. Span space: Define a 2D space, minimum as x-axis and maximum as y-axis plot cell as a point in the space 2D lattice subdivision of the span space Cover span space with a 2D lattice, sort cells into ‘buckets’, to identity quickly the active cells. The elements are allowed to be of unequal size; the method suitable to use on distributed system. A kd tree: an extension of a binary tree Slicing: If the slice is axially aligned If cell has arbitrary orientation If data is unstructured For axially aligned planes, construct tree using appropriate x/y/z coordinate, similar to kd tree, to For arbitrary orientation, apply suitable rotation then construct tree using appropriate x/y/z coordinate. Question: How to use the kd tree? What means “range based methods form Isosurface” ? Lecture 16: information Visualization Application: 1. Data mining 2. Hierarchies of information 3. Networks of information The character of information 1. Typically multivariate, with very large number of variables 2. Not necessarily numeric information Geometric Techniques: Scatter plot—Ens0 At pairs in 2D scatter plots Use of a ‘brushing’ can highlight subsets of data Parallel coordinate—Ens0 Create k equidistant vertical axes, each corresponding to a variable Each data item corresponds to a line drawn through point on each axis corresponding to value of the variable Daisy charts Variables and their values placed around circle Lines connect the value for one data item Iconic techniques Chernoff faces: encode a variety of variable Pixel-based techniques—aim at very large data sets Circle segment technique-- Ens1 Each segment represents one variable Hierarchical techniques Visualize data using a hierarchical subdivision of the display area Tree maps: Hierarchical partition of the screen into regions depending on attribute values Hyperbolic trees Popular method of displaying hierarchical structure such as link of web sites Graph-based techniques Suitable for visualization of network type data - Trade flows - Communication networks - Software engineering SeeNet: To understand e-mail traffic Ignore geography Document retrieval Question: What means document retrieval? Terminology: Underlying Independent variable Dependent variable Say: 假定 Slope Polynomial I.e. Hyperbola Multivariate X against Y Y versus X