HowTo:S2Slides

From S2PLOT

Jump to: navigation, search

Contents

How to create an s2slides presentation

As of S2PLOT version 2.0, a utility called s2slides is included with the distribution. S2slides is a program which can be used to combine 2-d and 3-d images, and interactive programs into a relatively slick, self-contained presentation.

Before using s2slides, you should be familiar with running an existing S2PLOT program over a background image and "scripting" key presses for S2PLOT applications.

To use s2slides, all you need is one or more mono or stereo bitmap images or S2PLOT programs. These should be arranged into a simple text file that s2slides will execute. Here is an example (taken from Barnes' 2007 ADASS talk).

<code>
#introduction
./slides/Slide1.tga
./slides/Slide2.tga
./slides/Slide3.tga
!./s2pg ./runme

# astro examples
./slides/Slide5.tga
!./6dF ./runme
./slides/Slide7.tga
!./cluster ./runme
./slides/Slide9.tga
!./slicer ./runme
./slides/Slide11.tga
!./milkyway ./runme

# pdf promo
./slides/Slide12.tga
!./paper ./runme

# final slide
./slides/Slide13.tga
</code>

In this example, the first three "slides" shown by s2slides are the images Slide1.tga, Slide2.tga and Slide3.tga. In this case, they were created in Powerpoint.

0Following the slides, the executable "runme" is run from the subdirectory s2pg, because the line is prefixed with an exclamation mark "!" indicating executable not image. In this particular instance, runme is actually a C-shell script, which happens to look like this:

<code>
#!/bin/csh -f

# Main keys in simulation are:
#
# Shift-Q      quit
# Shift-ESC    quit
# SPACE        quit
#
# 5            toggle mono / anaglyph mode
# +/-          move in / out
# cursor keys  control viewpoint
# mouse drag   control viewpoint

set arch=`uname -p`
set exe="./s2pg.$arch"

set dev="/S2MONO"
if ("$1" == "-ss" || "$2" == "-ss") then
  set dev="/S2PASSV"
endif
if ("$1" == "-s" || "$2" == "-s") then
  set dev="/S2ACTIV"
endif

if ("$1" == "-f" || "$2" == "-f") then
  set dev="${dev}F"
endif
 
if (! -x $exe) then
  echo Cannot locate suitable binary to run.
  exit
endif
echo
echo Showing inter/act s2slide ...
echo "  *** Press Shift-Q, Shift-ESC or SPACE to exit ***"
echo

# stereo passive version
setenv S2PLOT_X1 0.5
setenv S2PLOT_X2 0.97
setenv S2PLOT_Y1 0.3
setenv S2PLOT_Y2 0.85
setenv S2PLOT_BGIMG ./bg.tga

echo $dev | $exe >& /dev/null
</code>

A few points about this runme file:

  • the arch variable shows how you might support running S2PLOT applications and therefore s2slides on multiple architectures.
  • the dev variable is set according to the device s2slides provides the runme script with. The S2PLOT device settings with which s2slides is run (see below) are simply passed on to executables. This runme script parses the device settings to express them as standard S2PLOT devices.
  • the S2PLOT_BGIMG and associated window location variables are used to embed this demo S2PLOT program in a particular part of a background image "bg.tga".

S2slides command-line arguments

One of the key useful features of s2slides is that it can be run in active, passive and interleaved stereo mode, and mono mode, just by changing its command-line arguments:

  • -ss - passive stereo mode
  • -si - interleave stereo mode
  • -s - active stereo mode
  • -f - fullscreen mode

These arguments are passed on on the command-line to any executables that s2slides runs as part of a presentation.

Navigation in s2slides

When viewing a plain image slide:

  • spacebar: forward
  • Shift-Q, Shift-ESC: quit the presentation
  • 6: to start
  • 7: back to previous plain image slide (skipping any interactives [ie. executables])
  • 8: forward to next plain image slide (skipping any interactives)
  • 9: to end

When viewing an interactive / executable S2PLOT program:

  • Shift-Q, Shift-ESC: quit interactive and go to next slide
  • (if programmed as recommended) spacebar: quit interactive and go to next slide

Tips

  • it's nice to create the slide images in Powerpoint, so you retain the presentation "feel" that most people expect
  • it's nice to map the spacebar in your S2PLOT programs to "quit" when run in s2slides mode; this way navigation is more easily remembered: space to go forward.
  • s2slides can execute any program using the "!" syntax. You are not restricted to S2PLOT programs, although the presentation will be more "seamless" if you restrict yourself to S2PLOT.
Personal tools