Caverot applet
Here's the caverot applet in action:
To get this working, you need
- the java program caverot.jar
- some html to tell the browser about the applet:
<applet code="caverot.class" archive="/caving/old/caverot/caverot.jar"
name="caverot" width="300" height="300">
<param name="cave" value="http://www.yoursite.co.uk/cavefile.3dz">
</applet>
Change the archive= entry to point to the program on your web server. Change the value= parameter
to point to your cave file.
- Note that the cave data file must be a full URL - not relative! Caught me out, Jarv 2008.
- A cave data file in .3dz format. This is a gzip compressed text file containing a series of move/draw
commands. Here's an example
0 0 0 0
1 -154 61 -73
0 0 0 0
1 100 72 640
1 192 341 944
1 192 341 523
0 192 341 944
1 192 341 1384
1 557 607 1712
1 580 882 1841
1 525 1226 1903
1 701 1138 2694
1 967 1166 2889
1 993 1327 2900
-1 -154 0 -73
-1 993 1327 2900
The first column is a command: 0 is move, 1 is draw. The next three are x,y,z in cm. The last two lines
are
-1 xmin ymin zmin
-1 xmax ymax zmax
Here's a small tool for converting survex .3d files 3d2text.c
Compile it in with the survex source tree with something like
gcc -o 3d2text 3d2text.c img.o useful.o message.o filename.o osdepend.o
With survex 1.0.32; Jarvist found the following to work:-
gcc -o 3d2text 3d2text.c img.o useful.o message.o filename.o osdepend.o cmdline.o -lm
Run it with
./3d2text cave.3d | gzip > cave.3dz
That's it.
If you're using windows, you'll need to get hold of gzip from http://www.gzip.org
The source to the applet is here
If you have any questions, you can mail me on clewingriffith@yahoo.com
|