Introduction to Scientific Visualization in the WestGrid Environment Jon Johansson.

68
Introduction to Scientific Visualization in the WestGrid Environment Jon Johansson

Transcript of Introduction to Scientific Visualization in the WestGrid Environment Jon Johansson.

Introduction to Scientific Visualization in the WestGrid

Environment

Introduction to Scientific Visualization in the WestGrid

Environment

Jon JohanssonJon Johansson

What is Scientific Visualization?What is Scientific Visualization?• convert scientific data into visual form

– use computer to process data• numerical algorithms such as marching

cubes to extract features• add color, lights, camera view (create a 3D

scene)• graphics techniques to render

– the data sets can be large – many gigabytes or more

• resulting image is presented to the human visual processing system for the direct analysis and interpretation of the information

• convert scientific data into visual form– use computer to process data

• numerical algorithms such as marching cubes to extract features

• add color, lights, camera view (create a 3D scene)

• graphics techniques to render– the data sets can be large – many gigabytes or

more

• resulting image is presented to the human visual processing system for the direct analysis and interpretation of the information

What is Scientific Visualization?What is Scientific Visualization?

• generally deals with data that has a natural geometric structure

•MRI, CAT data (measured)•weather simulations (computed)

• generally deals with data that has a natural geometric structure

•MRI, CAT data (measured)•weather simulations (computed)

What is Scientific Visualization?What is Scientific Visualization?

• the key point is that we can understand data in a picture much better than we can understand a bunch of numbers

• WestGrid resources can generate a lot of numbers!!

• the key point is that we can understand data in a picture much better than we can understand a bunch of numbers

• WestGrid resources can generate a lot of numbers!!

What is Scientific Visualization?What is Scientific Visualization?• use well understood algorithms to

extract features from data sets• goals

– understand the data (exploration)• interactively examine the data looking for

the parts that are interesting– communicate the data to peers

• publications• conferences

• use well understood algorithms to extract features from data sets

• goals– understand the data (exploration)

• interactively examine the data looking for the parts that are interesting

– communicate the data to peers• publications• conferences

What is Scientific Visualization?What is Scientific Visualization?

• once we find interesting structures in the data we have the freedom to arrange– colors– lights– transparency– camera views

• this should clarify what we are looking at

• once we find interesting structures in the data we have the freedom to arrange– colors– lights– transparency– camera views

• this should clarify what we are looking at

WestGrid Visualization ResourcesWestGrid Visualization Resources

• WestGrid provides a visualization server located at Simon Fraser University

• the machine can be accessed as:– hydra.westgrid.cahydra.westgrid.ca– vizserver.westgrid.cavizserver.westgrid.ca– IP address: 206.12.24.8IP address: 206.12.24.8

• Hydra is an SGI Onyx UltimateVision graphics supercomputer– 24 processors– 14 GB RAM – 10 graphics pipes

• WestGrid provides a visualization server located at Simon Fraser University

• the machine can be accessed as:– hydra.westgrid.cahydra.westgrid.ca– vizserver.westgrid.cavizserver.westgrid.ca– IP address: 206.12.24.8IP address: 206.12.24.8

• Hydra is an SGI Onyx UltimateVision graphics supercomputer– 24 processors– 14 GB RAM – 10 graphics pipes

WestGrid Visualization ResourcesWestGrid Visualization Resources

• You should have access to hydra automatically by being granted access to WestGrid resources

• Info about accounts:– http://www.westgrid.ca/support//About_Accounts

• Apply for an account at:– http://www.westgrid.ca/support//Applying_for_an_Ac

count

• You should have access to hydra automatically by being granted access to WestGrid resources

• Info about accounts:– http://www.westgrid.ca/support//About_Accounts

• Apply for an account at:– http://www.westgrid.ca/support//Applying_for_an_Ac

count

WestGrid Visualization ResourcesWestGrid Visualization Resources

Web links for more information:Web links for more information:• WestGrid Collaboration/Visualization

– http://www.westgrid.ca/collabvis/visualization/ • Visualization Server Usage page

– http://www.westgrid.ca/collabvis/visualization/vizserver_software.php

• SFU Visualization Server Site– http://www.westgrid.ca/support_old/site/site-vi

z.php

Web links for more information:Web links for more information:• WestGrid Collaboration/Visualization

– http://www.westgrid.ca/collabvis/visualization/ • Visualization Server Usage page

– http://www.westgrid.ca/collabvis/visualization/vizserver_software.php

• SFU Visualization Server Site– http://www.westgrid.ca/support_old/site/site-vi

z.php

OpenGL VizserverOpenGL Vizserver

• SGI Vizserver is client-server software that allows you to run fully hardware-accelerated graphics applications on a remote machine and have images delivered to your desktop

• the server is installed on – hydra.westgrid.ca

• the client is installed on your workstation

• SGI Vizserver is client-server software that allows you to run fully hardware-accelerated graphics applications on a remote machine and have images delivered to your desktop

• the server is installed on – hydra.westgrid.ca

• the client is installed on your workstation

OpenGL VizserverOpenGL Vizserver

• OpenGL VizServer– the server software runs on the WestGrid

Visualization Server machine– the client runs on the users desktop machine– http://www.sgi.com/products/software/vizserver/

• there are currently 5 licenses for the Vizserver software on hydra

• OpenGL VizServer– the server software runs on the WestGrid

Visualization Server machine– the client runs on the users desktop machine– http://www.sgi.com/products/software/vizserver/

• there are currently 5 licenses for the Vizserver software on hydra

OpenGL VizserverOpenGL Vizserver

• Application-transparent– OpenGL Vizserver runs existing OpenGL® API-

based applications without modification

• Shared application control– OpenGL Vizserver instantly turns existing

stand-alone applications into collaborative applications with up to five remote sites sharing control of a single interactive application

• Application-transparent– OpenGL Vizserver runs existing OpenGL® API-

based applications without modification

• Shared application control– OpenGL Vizserver instantly turns existing

stand-alone applications into collaborative applications with up to five remote sites sharing control of a single interactive application

OpenGL VizserverOpenGL Vizserver

• Platform/system independent– OpenGL Vizserver gives existing

workstations, personal computers, and even wireless handheld devices the power of a Silicon Graphics Prism or SGI Onyx family system, as well as direct interaction with experts on Silicon Graphics workstations.

• Platform/system independent– OpenGL Vizserver gives existing

workstations, personal computers, and even wireless handheld devices the power of a Silicon Graphics Prism or SGI Onyx family system, as well as direct interaction with experts on Silicon Graphics workstations.

OpenGL VizserverOpenGL Vizserver

• you can run nearly any graphics or visualization application on the remote SGI host (hydra.westgrid.ca), and have the resulting imagery delivered to your desktop

• the client machine simply decompresses and displays the image created by the server

• you can run nearly any graphics or visualization application on the remote SGI host (hydra.westgrid.ca), and have the resulting imagery delivered to your desktop

• the client machine simply decompresses and displays the image created by the server

OpenGL VizserverOpenGL Vizserver

• why the Vizserver approach is better:– X doesn't support hardware accelerated 3D

graphics• OpenGL function calls are passed to the

graphics card on your desktop– the X protocol is horribly inefficient

• Vizserver uses a much more streamlined (custom) protocol to move events and payload image data

• data compression is available– Vizserver lets multiple users interact

simultaneously with a single application running on the graphics server

• each connection has a dedicated graphics pipe

• why the Vizserver approach is better:– X doesn't support hardware accelerated 3D

graphics• OpenGL function calls are passed to the

graphics card on your desktop– the X protocol is horribly inefficient

• Vizserver uses a much more streamlined (custom) protocol to move events and payload image data

• data compression is available– Vizserver lets multiple users interact

simultaneously with a single application running on the graphics server

• each connection has a dedicated graphics pipe

OpenGL VizserverOpenGL Vizserver

• OpenGL Vizserver clients are available for – SGI® IRIX® OS-based systems, such as Silicon

Graphics Octane2, Silicon Graphics Fuel, Silicon Graphics® O2+™, and the SGI Onyx family

– Linux®– Solaris™– Windows NT®, Windows® 2000, Windows® XP,

and Windows® XP Tablet PC Edition– Mac OS X

• OpenGL Vizserver clients are available for – SGI® IRIX® OS-based systems, such as Silicon

Graphics Octane2, Silicon Graphics Fuel, Silicon Graphics® O2+™, and the SGI Onyx family

– Linux®– Solaris™– Windows NT®, Windows® 2000, Windows® XP,

and Windows® XP Tablet PC Edition– Mac OS X

OpenGL VizserverOpenGL Vizserver

• the OpenGL Vizserver client is a free download from the SGI website– https://support.sgi.com/login

• note that you must create a Supportfolio ID to be able to download the client– this is free

• the OpenGL Vizserver client is a free download from the SGI website– https://support.sgi.com/login

• note that you must create a Supportfolio ID to be able to download the client– this is free

Connection to HydraConnection to Hydra

• you need to create an SSH tunnel to hydra to be able to use it.

• from a Linux/Unix machine:– ssh -L 7051:hydra.westgrid.ca:7051ssh -L 7051:hydra.westgrid.ca:7051

-N [email protected] [email protected]– replace “username” with your WestGrid

username and you will be prompted for your password

• 7051 is the port that vizserver uses to make connections

• you need to create an SSH tunnel to hydra to be able to use it.

• from a Linux/Unix machine:– ssh -L 7051:hydra.westgrid.ca:7051ssh -L 7051:hydra.westgrid.ca:7051

-N [email protected] [email protected]– replace “username” with your WestGrid

username and you will be prompted for your password

• 7051 is the port that vizserver uses to make connections

Connection to HydraConnection to Hydra

• you will need to set an environment variable to be able start a vizserver session:– VSX_SESSION_HOST = hydra.westgrid.ca

• launch the vizserver client– connect to “localhost” not to hydra– the connection is handled by the tunnel

• you still need to authenticate to Hydra with your WestGrid username and password.– http://www.westgrid.ca/collabvis/documents/vizserv

er_tunnel.pdf

• you will need to set an environment variable to be able start a vizserver session:– VSX_SESSION_HOST = hydra.westgrid.ca

• launch the vizserver client– connect to “localhost” not to hydra– the connection is handled by the tunnel

• you still need to authenticate to Hydra with your WestGrid username and password.– http://www.westgrid.ca/collabvis/documents/vizserv

er_tunnel.pdf

Connection to HydraConnection to Hydra

Sample session start• set up the SSH tunnel

– ssh -L 7051:hydra.westgrid.ca:7051 ssh -L 7051:hydra.westgrid.ca:7051

[email protected]@hydra.westgrid.ca

• set the environment variable (Bash shell)– export VSX_SESSION_HOST=hydra.westgrid.caexport VSX_SESSION_HOST=hydra.westgrid.ca

• launch the client– vizserver -h localhost vizserver -h localhost

Sample session start• set up the SSH tunnel

– ssh -L 7051:hydra.westgrid.ca:7051 ssh -L 7051:hydra.westgrid.ca:7051

[email protected]@hydra.westgrid.ca

• set the environment variable (Bash shell)– export VSX_SESSION_HOST=hydra.westgrid.caexport VSX_SESSION_HOST=hydra.westgrid.ca

• launch the client– vizserver -h localhost vizserver -h localhost

OpenGL VizserverOpenGL Vizserver

• Sample session start (cont.)• enter your WestGrid user id and

password to login to hydra• start a session• select parameters for the session• launch applications from the vizserver

console window

• Sample session start (cont.)• enter your WestGrid user id and

password to login to hydra• start a session• select parameters for the session• launch applications from the vizserver

console window

SSH tunnelingSSH tunneling

• also called “port forwarding” or “port mapping”

• forward a network port from one network node to another

• used to carry insecure network traffic over the Internet in a secure way

• users outside a firewall can access a service inside the firewall

• also called “port forwarding” or “port mapping”

• forward a network port from one network node to another

• used to carry insecure network traffic over the Internet in a secure way

• users outside a firewall can access a service inside the firewall

SSH tunnelingSSH tunneling

• ssh connects using port 22 – connection is encrypted and secure

• vizserver connects using port 7051– connection is not encrypted

• to make a vizserver session secure, wrap the vizserver session inside ssh

• ssh connects using port 22 – connection is encrypted and secure

• vizserver connects using port 7051– connection is not encrypted

• to make a vizserver session secure, wrap the vizserver session inside ssh

SSH tunnelingSSH tunneling

• on the source machine – ssh listens for packets addressed to port 7051– all those packets are encrypted and addressed to

the destination using port 22• on the destination machine

– when the packets are received, ssh decrypts them– packets are then sent to the destination port

• on the source machine – ssh listens for packets addressed to port 7051– all those packets are encrypted and addressed to

the destination using port 22• on the destination machine

– when the packets are received, ssh decrypts them– packets are then sent to the destination port

SSH tunnelingSSH tunneling

• We can use a GUI and manually assign port forwarding – port 7051 on localhost is forwarded to 7051 on

the remote host• this is an “outgoing” tunnel

– we don’t need an incoming (reverse) tunnel for port 7051 - only an outgoing tunnel to the server

• our big concern is that the username and password used to authenticate to hydra be encrypted

• We can use a GUI and manually assign port forwarding – port 7051 on localhost is forwarded to 7051 on

the remote host• this is an “outgoing” tunnel

– we don’t need an incoming (reverse) tunnel for port 7051 - only an outgoing tunnel to the server

• our big concern is that the username and password used to authenticate to hydra be encrypted

Scientific VisualizationScientific Visualization

• Having opened a connection to hydra we would like to use a visualization application – what’s available?

• Having opened a connection to hydra we would like to use a visualization application – what’s available?

Package Name Start Command

AVS/Express 6.2 express

OpenDX 4.3.2 dx

VTK vtk (the tcl shell for vtk)

Viz PackagesViz Packages

• OpenDX, VTK are AVS use a pipelined, component-based architecture

• a user can quickly assemble modular software components into a “finished application.”

• these systems are flexible in the sense that components can be combined in a multitude of ways, thereby allowing an application developer to accomplish a wide variety of visualization tasks

• they are extensible as they offer the means for developers to add new components to the system, thereby extending the system’s functionality

• OpenDX, VTK are AVS use a pipelined, component-based architecture

• a user can quickly assemble modular software components into a “finished application.”

• these systems are flexible in the sense that components can be combined in a multitude of ways, thereby allowing an application developer to accomplish a wide variety of visualization tasks

• they are extensible as they offer the means for developers to add new components to the system, thereby extending the system’s functionality

Scientific VisualizationScientific Visualization

• to be able to run OpenDX on hydra:– set the environment variable DXROOT to

•setenv DXROOT /usr/local/dx(tcsh)

•export DXROOT=/usr/local/dx(bash)

– add the following directory to your library path•setenv LD_LIBRARY_PATH

{LD_LIBRARY_PATH}:/usr/local/lib/(tcsh)

• to be able to run OpenDX on hydra:– set the environment variable DXROOT to

•setenv DXROOT /usr/local/dx(tcsh)

•export DXROOT=/usr/local/dx(bash)

– add the following directory to your library path•setenv LD_LIBRARY_PATH

{LD_LIBRARY_PATH}:/usr/local/lib/(tcsh)

Scientific VisualizationScientific Visualization

• In order to create a visualization:– import your data into the package– explore the data looking for the interesting

features• lots of work here

– having found interesting features set up the view to show them clearly. Select:

• colors/surface properties• camera view• lights (these have some properties to

adjust)– export images/animations

• In order to create a visualization:– import your data into the package– explore the data looking for the interesting

features• lots of work here

– having found interesting features set up the view to show them clearly. Select:

• colors/surface properties• camera view• lights (these have some properties to

adjust)– export images/animations

Scientific VisualizationScientific Visualization

• color choice can help to clarify a visualization

• a handy guide is the online paper “A Rule-based Tool for Assisting Colormap Selection” by Lawrence D. Bergman, Bernice E. Rogowitz and Lloyd A. Treinish, all from IBM

• http://www.research.ibm.com/dx/proceedings/pravda/index.htm

• lots of interesting references at the end

• color choice can help to clarify a visualization

• a handy guide is the online paper “A Rule-based Tool for Assisting Colormap Selection” by Lawrence D. Bergman, Bernice E. Rogowitz and Lloyd A. Treinish, all from IBM

• http://www.research.ibm.com/dx/proceedings/pravda/index.htm

• lots of interesting references at the end

Scientific VisualizationScientific Visualization

• another very nice online publication is “How NOT to Lie with Visualization” by Bernice E. Rogowitz and Lloyd A. Treinish, from IBM

• http://www.research.ibm.com/dx/proceedings/pravda/truevis.htm

• PRAVDA is intellectual property (IBM’s) separate from OpenDX and isn’t freely available

• the papers are still worth reading

• another very nice online publication is “How NOT to Lie with Visualization” by Bernice E. Rogowitz and Lloyd A. Treinish, from IBM

• http://www.research.ibm.com/dx/proceedings/pravda/truevis.htm

• PRAVDA is intellectual property (IBM’s) separate from OpenDX and isn’t freely available

• the papers are still worth reading

Scientific VisualizationScientific Visualization

Source: http://www.research.ibm.com/dx/proceedings/pravda/truevis.htm

Sample Data SetSample Data Set

• We have the electric potential due to a dielectric cylinder introduced into a constant electric field E0

• the parameters I used are:– E0 = 50 V/m

– dielectric constant = 5

– Rcyl = 10 m

– -50 m ≤ x, y, z ≤ 50 m

• We have the electric potential due to a dielectric cylinder introduced into a constant electric field E0

• the parameters I used are:– E0 = 50 V/m

– dielectric constant = 5

– Rcyl = 10 m

– -50 m ≤ x, y, z ≤ 50 m

Sample Data SetSample Data Set

OpenDX Data ImportOpenDX Data Import

• a data file might consist of ascii values, each line containing 4 values…

-8.50000000 14.72243186 48.00000000 326.96078431 -8.50000000 14.72243186 49.00000000 326.96078431 -8.50000000 14.72243186 50.00000000 326.96078431 -9.50627936 14.09363873 -50.00000000 365.66830060 -9.50627936 14.09363873 -49.00000000 365.66830060 -9.50627936 14.09363873 -48.00000000 365.66830060 …

• it’s important know how the file was written:• row major:

for( i = 0; i < nx; i++){ for( j = 0; j < ny; j++){ for( k = 0; k < nz; k++){ fprintf( outfh, "%12.8f %12.8f %12.8f %12.8f \n", x, y, z, V

); } }}

• row major is defined by the last index varying the fastest

• a data file might consist of ascii values, each line containing 4 values…

-8.50000000 14.72243186 48.00000000 326.96078431 -8.50000000 14.72243186 49.00000000 326.96078431 -8.50000000 14.72243186 50.00000000 326.96078431 -9.50627936 14.09363873 -50.00000000 365.66830060 -9.50627936 14.09363873 -49.00000000 365.66830060 -9.50627936 14.09363873 -48.00000000 365.66830060 …

• it’s important know how the file was written:• row major:

for( i = 0; i < nx; i++){ for( j = 0; j < ny; j++){ for( k = 0; k < nz; k++){ fprintf( outfh, "%12.8f %12.8f %12.8f %12.8f \n", x, y, z, V

); } }}

• row major is defined by the last index varying the fastest

OpenDX Data ImportOpenDX Data Import

• We have a data set that has regular spacings in the x, y and z directions

• We don’t need to read the coordinates for each point from a file

• The general header file to read in this data is:• file = ./pot_cart.dat• grid = 101 x 101 x 101• format = ascii• interleaving = field• majority = row• header = lines 0• field = potential• structure = scalar• type = float• dependency = positions• positions = regular, regular, regular, -50.0, 1.0, -50.0,

1.0, -50.0, 1.0• end

• We have a data set that has regular spacings in the x, y and z directions

• We don’t need to read the coordinates for each point from a file

• The general header file to read in this data is:• file = ./pot_cart.dat• grid = 101 x 101 x 101• format = ascii• interleaving = field• majority = row• header = lines 0• field = potential• structure = scalar• type = float• dependency = positions• positions = regular, regular, regular, -50.0, 1.0, -50.0,

1.0, -50.0, 1.0• end

Sample Data SetSample Data Set

• the connections between the points are inferred when you tell OpenDX that the data are “row major”

• these are Cartesian connections

• the connections between the points are inferred when you tell OpenDX that the data are “row major”

• these are Cartesian connections

Sample Data SetSample Data Set

• you can also work in non-Cartesian coordinates

• the grid is row major in cylindrical coordinates (r, phi, z)

• write Cartesian coordinates in the file and connections are inferred from the cylindrical grid

• you can also work in non-Cartesian coordinates

• the grid is row major in cylindrical coordinates (r, phi, z)

• write Cartesian coordinates in the file and connections are inferred from the cylindrical grid

Sample Data SetSample Data Set

Sample Data SetSample Data Set

Data ImportData Import

• Start with a FileSelector module to browse to the general file describing the data set and connect it to an import module which actually does the reading

• Double click on the FileSelector to get a widget to browse the file system

• When the data is in the package we can start applying algorithms to it and look for interesting features

• Start with a FileSelector module to browse to the general file describing the data set and connect it to an import module which actually does the reading

• Double click on the FileSelector to get a widget to browse the file system

• When the data is in the package we can start applying algorithms to it and look for interesting features

Components of the visualizationComponents of the visualization

• Isovalues of the electric potential• The lower slice shows the electric

potential with contour lines to give a sense of the shape change close to the cylinder– Use a slab module to extract a slice of

the potential field– Use the Isosurface module to extract

contour lines at values• -1750, -1250, -750, -250, 250, 750,

1250, 1750 volts

• Isovalues of the electric potential• The lower slice shows the electric

potential with contour lines to give a sense of the shape change close to the cylinder– Use a slab module to extract a slice of

the potential field– Use the Isosurface module to extract

contour lines at values• -1750, -1250, -750, -250, 250, 750,

1250, 1750 volts

Components of the visualizationComponents of the visualization

• In the Slab module set the parameters:– dimension: “z”– position: 0– thickness: (0 or 1)

• this is the default

• The AutoColor module generates a color map so that we have something to see

• In the Slab module set the parameters:– dimension: “z”– position: 0– thickness: (0 or 1)

• this is the default

• The AutoColor module generates a color map so that we have something to see

Components of the visualizationComponents of the visualization

Components of the visualizationComponents of the visualization• Take the output of the Slab module

and attach it to the input of an Isosurface module– The 2D slab data will result in contour

lines– Set the isovalues at

• -1750, -1250, -750, -250, 250, 750, 1250, 1750 volts

• The contour lines are then passed to a Tube module– Set the diameter of the tube to 1.0

• Take the output of the Slab module and attach it to the input of an Isosurface module– The 2D slab data will result in contour

lines– Set the isovalues at

• -1750, -1250, -750, -250, 250, 750, 1250, 1750 volts

• The contour lines are then passed to a Tube module– Set the diameter of the tube to 1.0

Components of the visualizationComponents of the visualization

Components of the visualizationComponents of the visualization

• Electric field lines• The middle slice is color mapped to

the magnitude of the electric field and shows some field lines– The lines are diverted in the region of the

cylinder

• Use the Gradient module and the Compute module to calculate the electric field from the electric potential

E = - grad

• Electric field lines• The middle slice is color mapped to

the magnitude of the electric field and shows some field lines– The lines are diverted in the region of the

cylinder

• Use the Gradient module and the Compute module to calculate the electric field from the electric potential

E = - grad

Components of the visualizationComponents of the visualization

– Use a Slab module to extract a slice of the electric field

– Use the Streamline module to extract contour lines at values•The Streamline module needs the

vector field as one input, and a set of seed points as the next input

– Use the Tube module to produce lines with some thickness

– Use a Slab module to extract a slice of the electric field

– Use the Streamline module to extract contour lines at values•The Streamline module needs the

vector field as one input, and a set of seed points as the next input

– Use the Tube module to produce lines with some thickness

Components of the visualizationComponents of the visualization

• Use the Compute module after the gradient to negate the vector components

• In the Compute module set “expression” to

[-a.x, -a.y, -a.z]

• In Slab set– dimension: “z”– position: 50– thickness: (0 or 1)

• this is the default

• Use the Compute module after the gradient to negate the vector components

• In the Compute module set “expression” to

[-a.x, -a.y, -a.z]

• In Slab set– dimension: “z”– position: 50– thickness: (0 or 1)

• this is the default

Components of the visualizationComponents of the visualization

Components of the visualizationComponents of the visualization• To calculate streamlines

connect the Electric Field (output of Compute) to the left input of the Streamlines module

• Use another Slab module to extract a line of points to use as seeds for the stream line– Dimension: “x”– Position: 0

• Use Reduce to decrease the number of points by 4

• Use Tube with diameter 1.0

• To calculate streamlines connect the Electric Field (output of Compute) to the left input of the Streamlines module

• Use another Slab module to extract a line of points to use as seeds for the stream line– Dimension: “x”– Position: 0

• Use Reduce to decrease the number of points by 4

• Use Tube with diameter 1.0

Components of the visualizationComponents of the visualization

Components of the visualizationComponents of the visualization

• The top slice shows vector glyphs at some grid points of the electric field– The glyphs show the direction of the

field– The size of the glyphs is scaled to the

magnitude of the field

• The top slice shows vector glyphs at some grid points of the electric field– The glyphs show the direction of the

field– The size of the glyphs is scaled to the

magnitude of the field

Components of the visualizationComponents of the visualization• Insert a Reduce module and a

Glyph module between Slab and Collect

• The Slab module parameters:– Dimension: “z”– Position: 100

• The Reduce module has – Factor: 4.0

• In the Glyph module– Type: “rocket”– Shape: 1.0– Scale: 0.15– Ratio: 0.1

• Insert a Reduce module and a Glyph module between Slab and Collect

• The Slab module parameters:– Dimension: “z”– Position: 100

• The Reduce module has – Factor: 4.0

• In the Glyph module– Type: “rocket”– Shape: 1.0– Scale: 0.15– Ratio: 0.1

Components of the visualizationComponents of the visualization

Components of the visualizationComponents of the visualization• We have applied some

visualization techniques to the data and created 3 slices

• pretty, but what does it mean??

• this lacks context• need some

information to help the viewer understand what we are looking at

• We have applied some visualization techniques to the data and created 3 slices

• pretty, but what does it mean??

• this lacks context• need some

information to help the viewer understand what we are looking at

Components of the visualizationComponents of the visualization• Annotations – add these to provide the

context for the visualization• ShowBox lets the viewer know the

volume of space occupied by the data• Text: titles, labels – explain a bit• Axes provide orientation and scale• ColorBar – shows how the numbers are

mapped to color• Draw the cylinder so we see the cause of

all the trouble

• Annotations – add these to provide the context for the visualization

• ShowBox lets the viewer know the volume of space occupied by the data

• Text: titles, labels – explain a bit• Axes provide orientation and scale• ColorBar – shows how the numbers are

mapped to color• Draw the cylinder so we see the cause of

all the trouble

Components of the visualizationComponents of the visualization• The ShowBox module

draws a box around the extents of the data set– Use a Tube module to get

nicely rendered lines

• Caption modules allow you to place text in the 2D plane of the screen– Set the text and location

in the interface

• The ShowBox module draws a box around the extents of the data set– Use a Tube module to get

nicely rendered lines

• Caption modules allow you to place text in the 2D plane of the screen– Set the text and location

in the interface

Components of the visualizationComponents of the visualization

Components of the visualizationComponents of the visualization

• A very useful annotation in this visualization is some indication of where the cylinder actually is– It is, after all, the

source of all the disruption in the field

• A very useful annotation in this visualization is some indication of where the cylinder actually is– It is, after all, the

source of all the disruption in the field

Components of the visualizationComponents of the visualization• Use the Construct module to

create a line– Origin: {[0 0 -50]}– Deltas: {[0 0 1]}– Counts: [1 1 101]– Data: {1}

• The Tube module creates a cylinder around the line– Diameter: 20.0– Ngon: 25

• The Color module does just that– Color: “purple”– Opacity: 0.3

• Use the Construct module to create a line– Origin: {[0 0 -50]}– Deltas: {[0 0 1]}– Counts: [1 1 101]– Data: {1}

• The Tube module creates a cylinder around the line– Diameter: 20.0– Ngon: 25

• The Color module does just that– Color: “purple”– Opacity: 0.3

Components of the visualizationComponents of the visualization

Components of the visualizationComponents of the visualization

• When we put it all together and select the camera angle that we want we hopefully have what we want …

• My goals– Show a variety of techniques that I can

apply to this data set– Provide enough annotation to orient

the viewer– Make it look nice

• When we put it all together and select the camera angle that we want we hopefully have what we want …

• My goals– Show a variety of techniques that I can

apply to this data set– Provide enough annotation to orient

the viewer– Make it look nice

DebuggingDebugging

• Debugging• Sometimes things aren’t working

and you just don’t know why• OpenDX’s equivalent of the “print”

statement is the Describe module• Attach the Describe module to the

output port of any module that is providing a field and Describe will give you a summary of what the module is providing in the Message Window.

• Debugging• Sometimes things aren’t working

and you just don’t know why• OpenDX’s equivalent of the “print”

statement is the Describe module• Attach the Describe module to the

output port of any module that is providing a field and Describe will give you a summary of what the module is providing in the Message Window.

DebuggingDebugging

Scientific VisualizationScientific Visualization

• lots of info on the web• we have some introductory pages

at– http://sciviz.aict.ualberta.ca

• lots of info on the web• we have some introductory pages

at– http://sciviz.aict.ualberta.ca

The EndThe EndThe EndThe End• Questions?Questions?• Questions?Questions?