====== HyperFun Polygonizer ====== 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. The options can be changed using the keys as shown at the bottom of the window. ===== Installation ===== First, unzip the archive. This software uses the GLUT library in its implementation. If your machine is Windows95/98/NT, please, download glut32.dll and save it to the system directory. If you do not know the system directory location in your system, save to the same directory with hfp.exe, or search for "opengl32.dll", and save to the same directory. 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 FileName Options can be combination of the following flags: [-a (Parameters)] [-b (Bounding Box)] [-cf (Face Color)] [-cl (Line Color)] [-ct <> (Attributes)] [-d (Display Mode)] [-g (Grid Density)] [-h <> (Help)] [-i (IsoValue)] [-o (Object Name)] [-s (Search)] [-sb <> (Show Bounding Box)] [-stl (STL Out)] [-t <> (Time Report)] [-usedc (Dual Contouring)] [-w (Window Size)] [-wrl (VRML Out)] [-x (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 === -a 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 === -b -b -b -b Degault 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 to 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 === -cf -cf 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 === -cl -cl 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. === Attributes === -ct This options turns on the attributes handling (S[] array) for a model. The color defined in the model with S[] array will be used instead of face color with S[1] interpreted as red, S[2] as green, and S[3] as blue colors. === Display Mode === -d 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 === -g -g 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 === -h This option outputs information about available options. === Iso Value === -i 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 === -o Default Value: 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 === -s 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 === -t This option turns on the output of the timing information for the polygonization process. === Dual Contouring === -usedc Default Value: <1> This option turns on and off dual contouring polygonization. If the argument is equal to 0, the dual contouring is switched off and switched on otherwise. If it is switched off, the polygonization from previous versions is applied, which may produce better results for smooth objects with the Search option. Note that in the dual contouring mode Search and Time Report options are ignored. === Window Size === -w -w 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 === -wrl 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. === STL Output === -stl This option is used to output the resulting mesh in STL format. The argument is the name by which the STL file will be saved. === Mapping === -x Default Value: 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. ===== Examples ===== hfp tst.hf -g 50 -b 15 -stl tst.stl This command line means polygonization of the model tst.hf with the grid density 50x50x50 in the bounding box [-15,15] for x,y, and z coordinates. The resulting polygonal mesh is saved to the file tst.stl hfp tst.hf -b 15 -s 0.01 -usedc 0 The dual contouring is switched off, the polygonization from earlier versions is used instead with the search of the intersection point on the cell edge with accuracy of 1% of the edge length, and the default grid density 30x30x30 hfp tsta.hf -b 15 -g 77 -ct The model with attributes is polygonized with dual contouring and colors assigned to faces are taken from the array S[3]. The object "my_model" is processed by default.