Almost Everything you wanted to know about using S2PLOT to visualise astronomy datasets - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Almost Everything you wanted to know about using S2PLOT to visualise astronomy datasets

Description:

(Almost) Everything you wanted to know about using S2PLOT to visualise astronomy ... uses LaTeX to generate a bitmap which is converted into an S2PLOT texture for you. ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 38
Provided by: swinburneu
Category:

less

Transcript and Presenter's Notes

Title: Almost Everything you wanted to know about using S2PLOT to visualise astronomy datasets


1
(Almost) Everything you wanted to know about
using S2PLOT to visualise astronomy datasets
CRICOS provider 00111D
Christopher Fluke David Barnes
Those not properly initiated into the mysteries
of visualisation research often seek to
understand the images rather than appreciate
their beauty... Al Globus Eric Raible (1994)
2
What is Visualisation?
Visualisation System
Knowledge discovery
Data
Science
  • The process of creating (computer-generated)
    images in order to gain new understanding or
    insight into data.

3
Astronomical Data
  • Brunner et al. (2001)
  • Imaging data 2D, narrow ??, fixed epoch
  • Catalogs secondary parameters determined from
    processing (coordinates, fluxes, sizes, etc).
  • Spectroscopic data and products (e.g. redshifts,
    chemical composition).
  • Studies in the time domain - moving objects,
    variable and transient sources (synoptic surveys)
  • Numerical simulations from theory

Planning, data collection, reduction,
comprehension Many astronomical datasets have N gt
3
4
The rest of this presentation...
  • What is S2PLOT?
  • Getting started
  • Geometry
  • Points, lines, coordinates, labels, text
  • Spheres, cubes, polygons
  • Colour and colour maps
  • Static versus dynamic geometry S2PLOT callbacks
  • Billboards/splats
  • Handles
  • Nice fonts
  • Volume rendering, isosurfaces
  • Other media
  • 3d-PDF, Web, s2slides

5
Introducing S2PLOT
  • AIM to enable visualization-led scientific
    discovery
  • BY making an easy-to-use programming library
  • THAT WORKS ON the astronomers desktop
    workstation
  • AND WITHOUT RECOMPILATION ON advanced display
    devices
  • RESULT
  • S2PLOT Barnes et al., 2006, PASA, 23, 82
  • www.astronomy.swin.edu.au/s2plot (Version 2.4)

6
Key Features and Benefits
  • Supports standard and enhanced displays
  • Real-time interaction
  • Mouse keyboard navigation
  • Static and dynamic data
  • Runs on Apple/OSX, GNU/Linux and Windows
    (GNU/cygwin)
  • C/C, Fortran and Python
  • PGPLOT-inspired programming interface

7
A Practical Example
8
A Practical Example
9
A Practical Example
10
A Practical Example
11
A Practical Example
  • 2-d views of multi-d data
  • Colour-colour
  • Colour-magnitude

12
A Practical Example
13
S2PLOT Program Flow
Handle window events
Handle user events
Process callbacks
Draw geometry using OpenGL lists
14
An easy s2plot program (in C)
15
An easy s2plot program (in C)
16
An easy s2plot program (in C)
17
An easy s2plot program (in C)
18
An easy s2plot program (in C)
19
An easy s2plot program (in C)
20
Comiple and Execute
  • Configure your S2PLOT environment...
  • cbuild.csh s2example
  • ./s2example

21
Programming Reference
http//astronomy.swin.edu.au/s2plot
22
Sample code for every function
23
PGPLOT versus Native functions
24
Example Points and lines
25
Example spheres and polygons
26
Example text
27
Static versus Dynamic geometry
  • Static geometry
  • Draw it once
  • Dynamic
  • Redraw on every display refresh
  • Animation!
  • Advanced interaction mouse click events, key
    presses, iPod
  • Geometry that depends on camera angle
  • Callbacks

28
Billboards Splats
  • Billboards (2-d) things which always face the
    camera
  • good for labels markers
  • Splats billboards which are soft point-like
    textures (images)
  • visually appealing alternative to single-pixel
    points
  • star fields, stellar clusters
  • variable size and colour with good blending
    properties
  • simulated particle distributions
  • thresholded, gridded volume data
  • Billboards have to be redrawn whenever the camera
    moves, so they must only be created in a callback
    function.

29
Billboards Splats Example
30
Nice Fonts
  • As in PGPLOT, the basic font in S2PLOT is a
    "Hershey" font
  • vector-based
  • functional fast, but inelegant
  • S2PLOT provides 2 better ways to create text
    labels
  • unsigned int ss2ltt(char latexcmd, float
    aspect)
  • uses LaTeX to generate a bitmap which is
    converted into an S2PLOT texture for you.
    (Requires a few environment variables to be set
    correctly - see ENVIRONMENT.TXT in S2PLOT)
  • nice for equations
  • unsigned int ss2ftt(char fontfilename, char
    text, int fontsizepx, int border)
  • uses the FreeType2 font engine to generate a
    bitmap which is converted into an S2PLOT texture
    for you.

31
Nice Fonts Example
32
Handles
  • Handles provide user interaction
  • they can be displayed or hidden with Shift-S
  • your code can be alerted when a handle is clicked
    on
  • your code can be alerted when a handle is dragged
  • Handles have
  • a position in 3-d space, and a size (fraction of
    the screen)
  • a texture and colour for their "unselected" state
  • a texture and colour for their "selected" state
  • You can make invisible handles and draw other
    geometry at their location if you want.

33
Handles (continued)
  • Possible uses for handles
  • select points in a displayed dataset
  • select galaxies or stars or planets in a
    visualisation
  • define a 3-d region (volume selection)
  • provide buttons and sliders and even menus
  • this is typically done in "screen coordinates"
    mode
  • allow users to define control points along a
    spline camera path
  • etc.

34
Isosurfaces and Volume Rendering
Data courtesy J.English
35
Colour maps
  • Computers generate colours through R G B
    combinations
  • 24-bit RGB 16,777,216 (256³ or 224) colours
  • Colour can enhance important features
  • Can exaggerate unimportant details
  • Try different colour maps

36
Other media
  • 3-d PDF
  • Barnes, D.G., Fluke, C.J. 2008, Incorporating
    interactive 3-dimensional graphics in astronomy
    research papers, New Astronomy, 13, 599
  • Fluke, C.J., Barnes, D.G. 2008, The Interactive
    Astronomy Textbook, Astronomy Education Review,
    7, 113
  • Web
  • Fluke, C.J., Barnes, D.G., Jones, N.T. 2009,
    Interchanging Interactive 3-d Graphics for
    Astronomy, Publications of the Astronomical
    Society of Australia, accepted, arXiv0810.4201F
  • s2slides PowerPoint-style presentations

37
Where to next?
  • Try some S2PLOT sample code
  • http//astronomy.swin.edu.au/s2plot
  • Take part in the hands-on workshop
  • Talk to me about your data
Write a Comment
User Comments (0)
About PowerShow.com