Up: JGV Home Page
Using JGV
Installing JGV
To install JGV on your Web server, unpack the distribution file
(either JGV.tar.Z, or JGV.zip). Inside the "JGV" directory that the
unpacking process creates you will find several files, plus a
subdirectory called "geom". The class files are inside subdirectories
of the "geom" directory. Move the "geom" directory to some directory
that is visible to your web server.
When you invoke JGV, make sure that the file "logo.gif"
is in the same directory as the HTML file containing the applet tag.
Applet tag
To use JGV in a Web page you create an "applet tag" in an HTML
file that looks something like the following:
<applet
code="geom.jgv.JGVApplet"
codebase=../..
width=200 height=200>
<param name="background" value="0x000000">
<param name="file" value="data.oogl">
</applet>
The "code=" line gives the name of the applet to invoke and should
appear exactly as above. The "codebase=" line should give the
pathname on your server of the directory into which you installed the
"geom" directory in the installation process above; this pathname can
be relative to the current directory (the one containing the HTML file
you're writing), or it can be an absolute path from the root of your
Web tree. The "width=" and "height=" line should give the dimensions,
in pixels, that you want the JGV applet to take up in the Web page.
Following the initial "<applet ...>" tag there can be a number
of parameters to be passed to JGV. Each parameter should be given
in the form
<param name="NAME" value="VALUE">
where NAME is the name of the parameter, and VALUE is the value that
you want it to have. The parameters that JGV recognizes are:
- background: the background color, specified as 6-digit
hexadecimal integer
- file: the name of a data file to load; this file should
be stored on your server in the same directory as the HTML page
- geom: the actual geometry specification. This lets you
specify the geometry directly in the HTML file, rather than
having it download another file from the server. If you use
this, omit the file parameter. NOTE: in the value field
for the geom parameter you must terminate each line with
a semicolon. This is necessary because Netscape eliminates
newlines from parameter values. Also, avoid using tabs;
Netscape seems to eliminate them too. Use spaces instead.
Here's an example of a JGV applet tag
using the geom parameter.
Geometry formats
JGV recognizes a restricted subset of the
OOGL file format used by
Geomview.
Specifically, JGV
- recognizes the OFF and VECT types (but not their higher
dimensional versions, 4OFF, 4VECT, etc)
- recognizes the LIST and INST object types for building
composite objects
- correctly parses but ignores vertex color information in
OFF objects (it does correctly handle face colors, though)
- does not recognize appearances
- does not recognize handles (objects named with "define" or "unit")
- does not recognize the binary OOGL formats
For complete details of the OOGL file format, see the
OOGL documentation.
The Geometry Center Home Page
Comments to:
webmaster@geom.umn.edu
Created: Sep 16 1996 ---
Last modified: Thu Jan 29 14:59:02 1998