The Ray3D Wims Module
=====================

This module is under GPL, although the actual file is not included.

This module is originally written just for my own convenience.  Drawing
ray-traced 3D surfaces of parametric functions using POVRay is quite
attractive.  However, the existing PolyRay is only suitable for polynomials.
So I wrote it.  This module accepts parametric functions only, and the
user interface is quite similar to that of PolyRay or Traces Animes (It should
be more similar), but it calculates the coordinates and normals for each
grid point, and use meshes containing smooth triangles to raytrace the result.

Installation:

(`povray.data', `pariray', `paridata.c' are in the `others' directory of the tarball)

After extracting the tarball into the `modules' directory,
copy the `povray.data' and `pariray' shell scripts into the public_html/bin directory, then
test it thoroughly before allowing public access to it.

Create a new `paridata.c' similar to `pari.c', but with no `fsizelim', compile a `paridata'
binary into `public_html/bin'.  (The fsizelim is 131072 in `pari.c', which is too small for
this module)  The Makefile should also be modified to create the binary `paridata' (for pari2
only).  `paridata.c' modified from version 2.23 is given here.

The changes to `pari.c' are as follows:
1. In the `name2version' array, change `pari''s to `paridata''s.
2. Remove the statement `if (l>fsizelim) l=fsizelim; ' in about() and call_pari().
3. echoing and output processing (except stripping the header) are removed.
   The post-processing is useful for other modules, but they
   slows down much and does not help for this module.  So we can directly write the output from Pari.
   See `paridata.c''s output for details.

Step 3 is just for speed, so they are not essential but still very necessary (or the program
will take over 10 seconds to process 500K of data!).

Input checking are not modified, so security should not be hurt.

(If you consider removing `fsizelim' insecure, at least set it to a large value like 1M or 2M.
`paridata' can be moved into another directory that `!exec' cannot reach --- it should never be called by
a module directly, and is only used from `pariray'.)

Important: `povray.data' is modified from `povray'.  It appends data.pov (in POVray syntax)
to the POV file.  Check for the include path `/usr/lib/povray31/include', you may need to change
it if you are not using POVRay 3.1.
I have to add a `povray.data', because PovRay does not accept gnuplot-like data files.  Allowing
#include in Povray files are not safe.

About the examples:
To add more examples, simply add an entry to `example.dat' (record format,
the format is described in the comments, and resize the resulting JPEG image
to 240x180, put it into the `examples' directory as `picxx.dat', where `xx'
is the record number in `example.dat', starting from 1.

News:
1. Changed from Maxima to Pari for its ease to use.  (The speed did NOT increase)
Speed improved (by up to 3 times) by eliminating duplicate calculations.

Problems and TODO:
1. UI and functionality.
