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

*******************************
*******************************
**    HyperFun Polygonizer   **
**    ver:1.10  3/13/2000    **
*******************************
*******************************

This is the second release of the HyperFun Polygonizer (formerly the HyperFun 
Polgonal Viewer).  This executable polygonizes and displays an object from a 
hyperfun file.  With this version you can also export a VRML version of the 
output.  All options are set at the command line as is described in the 
Usage section below.

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 the MAM/VRS library and TCL/TK in its implementation.  
We would like to express our special thanks and appreciation to the MAM/VRS 
team for their hard work on a wonderful 3D graphics library.  Links to the 
TCL/TK and MAM/VRS websites are provided below.

TCL/TK: http://www.scriptics.com/
MAM/VRS: http://wwwmath.uni-muenster.de/math/inst/info/u/mam/

System Requirements:
-----------------------------------------------------------------------------
Pentium Processor or higher.
Windows 95, 98, or NT 4.0.
OpenGL.
TCL/TK 8.0.

The system has been tested on an NT 4.0 workstation with 128 MB of RAM.  This 
system can handle a 100X100X100 grid.  Much larger than this and the system 
will have to start using virtual memory which will result in quite a 
performance hit in calculation.

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

You then need to install TCL/TK 8.0.  We suggest installing the most recent 
8.0 version.  It can be obtained directly from Scriptics at:
http://www.scriptics.com/products/tcltk/8.0.html

If you downloaded the zip file that includes TCL/TK, the installation program
should be in the same directory and is named tcl805.exe.  Run the installation
program and complete the installation of TCL/TK on your computer.

At this point the software is ready to use from the directory it was extracted 
to.  Be sure and keep all files in the same directory.  There is a test 
file named tst.hf that can be run to test the executable.  Use the following 
command line:
hfp tst.hf

Within a few seconds a window should appear displaying a green mesh of the 
test object.  This test object is the same basic object displayed on the Web 
page as the HyperFun sample program.

Usage:
-----------------------------------------------------------------------------
hfp <S> (FileName)
	[-a <D,D,D....> (Parameters)] 
	[-b <D> <D,D> <D,D,D> <D,D,D,D,D,D> (BoundingBox)] 
	[-cf <I> <I,I,I> (FaceColor)]
	[-cl <I> <I,I,I> (LineColor)] 
	[-d <I> (DisplayMode)] 
	[-g <I> <I,I,I> (GridDensity)] 
	[-h <> (Help)] 
	[-i <D> (IsoValue)]
	[-o <S> (ObjectName)] 
	[-s <D> (Search)] 
	[-t <> (Time Report)] 
	[-w <I> <I,I> (WindowSize)] 
	[-wrl <S> (VRMLOut)] 
	[-x <D/C,D/C,D/C....> (Mapping)]

(I: integer)
(D: double)
(C: character)
(S: string)

FileName is the name of the model or hyperfun text file to use in the
polygonization.  This name must be specified, there is no default.

Parameters:         <D,D,D....> (Default Value <0.0,0.0,0.0,....>)
Given as a list of double values that become the parameter array for the object
being polygonized.  At least one double must be specified.  Any double type
value is acceptable.

Bounding Box:       <D> <D,D> <D,D,D> <D,D,D,D,D,D> (Default Value <30>)
Given as a list of double values that become the Bounding Box for the object
being polygonized.  When one argument is given it's +/- values are used t
define the Bounding Box about each axis.  Two arguments give the minumum and
maximum values around each axis.  Three arguments specify the +/- values of
the X, Y, and Z axis respectively.  Six arguments specify the entire Bounding
Box Xmin, Ymin, Zmin, Xmax, Ymax, and Zmax.  Any double type value is
acceptable.  The values for max must be greater than the values for min.

Face Color:         <I> <I,I,I> (Default Value <50,200,80>)
Given as a list of integer values between 0 and 255 that become the RGB values
of the Face Color.  When one argument is given that same value is used for Red,
Green, and Blue values.  When three arguments are given they are used for Red,
Green, and Blue values respectively.

Line Color:         <I> <I,I,I> (Default Value <0>)
Given as a list of integer values between 0 and 255 that become the RGB values
of the Line Color in Wireframe mode.  When one argument is given that same
value is used for Red, Green, and Blue values.  When three arguments are given
they are used for Red, Green, and Blue values respectively.

Display Mode:       <I> (Default Value <5>)
This option is used to set the display type for the mesh.  The integer argument
can be specified as follows:
        1 - Wireframe Only
        2 - Surface & Wireframe
        3 - Surface with Normals (Diffuse Lighting)
        4 - Surface & Wireframe with Normals (Diffuse Lighting)
        5 - Surface with Normals (Diffuse & Specular Lighting)
        6 - Surface & Wireframe with Normals (Diffuse & Specular Lighting)
        7 - Surface with Normals (Diffuse & Specular Lighting) & Normals
      Displayed
Note:  Normal calculation is not executed in Display Mode 1 or 2.
       This will also affect wrl output.

Grid Density:       <I> <I,I,I> (Default Value <30>
Given as a list of integer values between 2 and 250 that specify the Grid
Density used for polygonization.  When one argument is given that same
value is used for the X, Y, and Z Grid Density values.  When three arguments
are given they are used for the X, Y, and Z Grid Density values respectively.

Help:               No Arguments.
The -h option outputs this usage information.

Iso Value:          <D> (Default Value <0.0>
Given as a single double value.  This is the value of the Iso-surface of the
object being polygonized.

Object Name:        <S> (Default Value <my_model>
Given as a single string, this is the name of the Object in the Model that is
to be polygonized.  If the given Object does not exist the first object in the
model is used.

Search:     <D> (Default Value <0.1>)
This option is used to create a mesh with greater accuracy.  A search is done
for each vertex point.  This search will find the vertex within the specified
search number multiplied by the mesh size.

Time Report:        No Arguments.
The -t option turns on the output of the timing information for the
polygonization process.

Window Size:        <I> <I,I> (Default Value <480,320>
Given as a list of integer values that specify the width and height of the
display window in pixels.  The range of values for width is 160 to 1600, and
for height is 120 to 1200.  When one argument is given that same value is
used for both the height and width.  When two arguments are given they are
used for the height and width of the window respectively.

VRML Output:        <S> (Default Value <>)
This option is used to output the resulting mesh in VRML 2.0 format.  The
argument is the name by which the VRML file will be saved.

Mapping:            <D/C,D/C,D/C....> (Default Value <X,Y,Z>)
Given as a list of double values or characters that define the mapping for
object polygonization.  The charecters X, Y, and Z define the X, Y, and Z
mapping for the object.  Other variables will be held constant at the specified
double values.

Model/FileName:
This is the name of the Model, or more specifically the name of the
file that you want to view.  It has no default value, you must include a file
name right after the hfp command.

-o <ObjectName>:
This is the name of the object in the Model that you want to view.
It has a default value of "my_model".

-g <i|i,i,i>:
This is the Grid Density that will be used to polygonize the model.
Using the first template <i> xDensity=yDensity=zDensity=<i>. Using the second
template <i1,i2,i3> xDensity=<i1>, yDensity=<i2>, and zDensity=<i3>.  The
default values are xDensity=yDensity=zDensity=20.

-b <d|d,d,d|d,d,d,d,d,d>:
This is the Bounding Box of the object that will be used for
polygonization.  Using the first template <d> xMax=yMax=zMax=<d> and
xMin=yMin=zMin=-<d>. Using the second template <d1,d2,d3> xMax=<d1>,
xMin=-<d1>, yMax=<d2>, yMin=-<d2>, zMax=<d3>, and zMin=-<d3>.  Using the third
template <d1,d2,d3,d4,d5,d6> xMax=<d1>, xMin=<d2>, yMax=<d3>, yMin=<d4>,
zMax=<d5>, and zMin=<d6>. The default values are xMax=yMax=zMax=10 and
xMin=yMin=zMin=-10.

-cl <i|i,i,i> and -cf <i|i,i,i>:
These are the colors of the Lines and Faces of the resulting mesh
respectively.  All i values are clamped to avalue between 0 and 255. Using the
first template <i> Red=Green=Blue=<i> resulting in a shade of grey. Using the
second template <i1,i2,i3> Red=<i1>, Green=<i2>, and Blue=<i3>.  The default
values for the Lines are Red=0, Green=0, and Blue=0.  The default values for
the Faces are Red=50, Green=200, and Blue=80.

-s <i|i,i>:
This is the size of the window in which the resulting mesh will be
displayed.  Using the first template <i> X=Y=<i>. Using the second template
<i1,i2> X=<i1> and Y=<i2>.  All i values are clamped to a value between 50 and
1200. The default values for the size is X=400 and Y=300.

-t:
This option turns on a detailed time report of the calculation.
This report is turned off by default.

-w:
This option turns on a wireframe view of the Model.  The default
view is with faces turned on.

-h:
This option diplays the help information listed above.

