HowTo:S2Slides

From S2PLOT

Revision as of 05:49, 19 February 2008; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

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. Following them, the executable "runme" is run from the subdirectory s2pg. 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>
Personal tools