S2PLOT:S2web
From S2PLOT
Contents |
s2web: Embedding S2PLOT Content in Web Pages (using Flash)
Since version 2.02, S2PLOT has been able to write the displayed geometry to a VRML 97 format file. This format was selected as it can be read in by Adobe Acrobat 3D and embedded in Portable Document Format (PDF) files. See the section on 3-d PDF for more information.
We also use the VRML export capability of S2PLOT to produce content for the freely available S2PLOT Flash player, s2web. A syntax-only translation using the NIST-provided Vrml97ToX3dNist yields an X3D file from the S2PLOT-exported VRML, and the 3-d scene in the X3D file can be read and displayed by s2web. Camera control and interaction with the scene in the s2web application is almost identical to that in a native S2PLOT program. Volume rendering, billboards, handles and frame-based animation are all supported.
The s2web functionality of S2PLOT is documented in the following paper. If you use s2web to embed S2PLOT content in a web page, please cite or acknowledge this source:
- Fluke, C.J., Barnes, D.G., Jones, N.T., 2008, "Interchanging Interactive 3-d graphics for Cosmology", submitted to PASA, Oct 2008
Requirements
- S2PLOT version 2.02 or higher
- version 2.4 or higher recommended
- S2PLOT is freely available for non-commercial and educational use
- A program for converting TGA image files to PNG image files
- ImageMagick's
convert
is recommended
- ImageMagick's
- s2web version 0.1 or higher
- s2web is freely available for non-commercial and educational use
- The VRML97 to X3D converter (Vrml97ToX3dNist) from the National Institute of Standards and Technology
- Vrml97ToX3dNist is freely available
- The perl script
s2plot-vrml2x3d.pl
for post-processing S2PLOT-exported VRML and converting to X3D using Vrml97ToX3dNist-
s2plot-vrml2x3d.pl
is freely available and included with S2PLOT versions after (not including) 2.4. It is also available from the peripheral downloads section of the S2PLOT website
-
VRML export from S2PLOT
Most S2PLOT geometry can be written to VRML format. While running an S2PLOT program, simply press Shift-W and a file called "test.wrl" will be written. It will overwrite any pre-existing "test.wrl" file in the current working directory.
Please see the section on 3-d PDF for specific hints about VRML export.
Texture conversion
S2PLOT writes textures in TGA image format, with the name convention vrml-texNNN.tga
. It is necessary to convert these textures to PNG format prior to use of the S2PLOT-exported VRML. Textures are named in the output VRML file so that the necessary conversion is from vrml-texNNN.tga
to vrml-texNNN.tga.png
. This conversion can be accomplished with ImageMagick's convert
program or almost any other image editor or converter.
Creating the ZIP archive
The s2web
Flash program expects to be provided with a ZIP file that contains one X3D file, plus required textures in PNG image format.