                              HyperFun Project
*****************************************************************************
                              www.hyperfun.org

*******************************
*******************************
** HyperFun POVRay Extension **
**    ver:1.10  3/13/2000    **
*******************************
*******************************

This is the second release of the HyperFun POVRay Extension.  This dynamic 
library allows the user to raytrace an object described in a HyperFun file.
All ratracing options are set using POVRay scene descriptions.

HyperFun is a simple geometric modeling language. It is intended for 
model geometric objects described in the form:
     F(x1, x2, x3, ..., xn) >= 0, 
This language is applicable to modeling algebraic and skeleton-based 
"implicit" surfaces, convolution surfaces, distance-based models, voxel 
objects, and more general F-rep objects.  For details see www.hyperfun.org.

If you have any problem with the software or installation please email us 
using the "Contact" button at the bottom of the page on our website
(www.hyperfun.org).

This software uses R. Suzuki's Isosurface Patch for POVRay, and the 
distribution includes the Isosurface Patch.

We would like to express our special thanks and appreciation to the POVRay 
team for their hard work on a wonderful open source raytracer.  We would
also like to express our thanks to R. Suzuki for his Isosurface Patch which
drives the raytracing of the HyperFun objects.  Links to their respective 
websites are provided below.

POVRay Team: http://www.povray.org/

R. Suzuki's Isosurface Patch: 
http://www.public.usit.net/rsuzuki/e/povray/iso/index.html

System Requirements:
-----------------------------------------------------------------------------
Pentium Processor or higher.
Windows 95, 98, or NT 4.0.
POVRay with R. Suzuki's Isosurface Patch.

Our own compilation of a patched version of POVRay is available with one of 
the distributions.

Installation:
-----------------------------------------------------------------------------
First, unzip the archive.

You need to have installed POVRay with the Isosurface Patch.  If you have not
yet done this then download the 3.1g version of POVRay from (www.povray.org)
and install it.  You will need either our distribution that contains the 
Isosurface Patch of POVRay, or you will need to download it from Suzuki's 
site:
http://www.public.usit.net/rsuzuki/e/povray/iso/index.html

Unzip the pov3isow.zip into the POVRay bin/ directory. 
(At this point you have a patched version of POVRay.) 

Place the file named hyperfun.dll into the POVRay bin/ directory.
(At this point you can use this patched version to render HyperFun objects.) 

You can test the program with the file sphere.pov.  This file requires that 
the sphere.hf file be in the same directory.  The resulting image should be
a 3D sphere.


Usage:

isosurface{
   bounded_by {box { <-10.000, -10.000, -10.000>, <10.000, 10.000, 10.000>}}
   function {"HyperFun", library "hyperfun",
      "HF_program=**MyProgram.hf**, HF_object=**MyObject**, 
      x=**MyX**, y=**MyY**, z=**MyZ**",
      **MyArrayOfDoubles**}
   accuracy **MyAccuracy**
   sign -1
   max_gradient **MyMaxGradient**
   **MyOtherPOVCode**
   }


**MyProgram.hf**
This is where you specify the name of your HyperFun file.


**MyObject**
This is where you specify the name of the Object in your HyperFun program that
you want to raytrace.  This Object must exist in the HyperFun program specified
earlier.


**MyX**
This is an integer value that specifies what coordinate variable x[i] to map the 
physical x coordinate to.  Default it to 1.


**MyY**
This is an integer value that specifies what coordinate variable x[i] to map the 
physical y coordinate to.  Default it to 2.


**MyZ**
This is an integer value that specifies what coordinate variable x[i] to map the 
physical z coordinate to.  Default it to 3.


**MyArrayOfDoubles**
This is a comma delimited array of double values who's meaning varies depending
on the object definition.  An example would be a 4 dimensional object with
three parameters a[3].  Specified like this in the HyperFun language:

	myModel(x[4],a[3]){
	   myModel=...;
	}

If the array used looks like this <0.0, 0.0, 0.0, 4.5, 6.7, 8.0, -12.5> and 
assuming the xyz mapping looked like x=1, y=2, z=3. Then this can be tranlated as:
x[1]=x coordinate
x[2]=y coordinate
x[3]=z coordinate
x[4]=4.5
a[1]=6.7
a[2]=8.0
a[3]=-12.5

The resulting model would be rendered using these values.


**MyAccuracy**
The accuracy is the basically the accuracy of the search for the surface.  The 
lower the value the more accurate.  Notice that as you increase the accuracy, 
the render time will go up substantially.  Default to about 0.01.


**MyMaxGradient**
The MaxGradient is used to determine the size of the step used to find the object 
while raytracing.  If the value is to low you will not see parts of the object.  
The higher the better, but as with accuracy the render time will go up as this 
value is increased.  In place of "max_gradient **MyMaxGradient**" you can use eval.
The eval keyword will try to calculate the correct MaxGradient value and use it.


**MyOtherPOVCode**
Use other appropriate POVRay code here for setting color, texture, position,
etc...




