User Tools

Site Tools


Brief reference of HyperFun Polygonizer

In this reference, we use example1.hf created in Getting started, but you can use your own HyperFun file.

Note that a HyperFun file name has to be placed just after the hfp command; i.e., if you polygonize foo.hf with some options, the command would take the form:

hfp foo.hf -

Options supported by a specific version are described in the README.txt file.

Polygonize an object from a HyperFun file

Use the command below

hfp example1.hf

Then, the object described in example.hf is polygonized.


Export an object to VRML

To export an object described in a HyperFun file to VRML, -wrl option is used. If you do not specify a name, the default name out.wrl is used.

hfp example1.hf -wrl example1.wrl

Show the coordinate axes and the bounding box

Currently not implemented in the MS Windows version.

Synopsis for showing the coordinate axes: -sa Synopsis for showing the bounding box: -sb

To show the coordinate axes and the bounding box, use the command below

hfp example1.hf -sa -sb

Then, you can see the coordinate axes and the bounding box.


You can also show and hide these from the menu.


Change the display mode of an object

Synopsis: -d [1-7]

If you did not use this option, -d 5 is used as a default.

hfp example1.hf -d 1

If you use the above command, an object is displayed as a wireframe.


-d 1 -> Wireframe Only
-d 2 -> Surface & Wireframe
-d 3 -> Surface with Normals (Diffuse Lighting)
-d 4 -> Surface & Wireframe with Normals (Diffuse Lighting)
-d 5 -> Surface with Normals (Diffuse & Specular Lighting)
-d 6 -> Surface & Wireframe with Normals (Diffuse & Specular Lighting)
-d 7 -> Surface with Normals (Diffuse & Specular Lighting) & Normals

You can also change these from the menu.


Change the size of the bounding box

Synopsis: -b xv,yv,zv -b v same as -b v,v,v Specify double numbers in v, xv, yv, and zv

To change the size of the bounding box -b option is used. The default bounding box is a cube where each edge size is 20. -b xv, yv, zv defines the bounding box with the lower left front point (-abs(xv), -abs(yv), -abs(zv)) and the upper right back point (abs(xv), abs(yv), abs(zv)).


hfp example1.hf -b 5,5,5 -sb
hfp example1.hf -b 4,4,4 -sb
-b 5,5,5 -b 4,4,4

In the above examples, the sizes of the bounding box are 10x10x10 and 8x8x8, respectively. In the left one, the bounding box completely encloses the sphere. In the right one, the sphere has holes, because the outside of the bounding box was not calculated.

Change the grid density of the bounding box

Synopsis -g xv,yv,zv -g v is same as -g v,v,v Specify integer numbers in v, xv, yv, and zv

The default value is 30. The value can be from 2 to 250 depending on the memory available on your computer.

To specify the grid density in the bounding box, -g is used. The meanings of xv,yv,zv are the density of x, the density of y and the density of z, respectively.

The higher density incleases the number of polygons, accuracy, and calculation time.


hfp example1.hf -g 5 -d 5
hfp example1.hf -g 50 -d 5
-g 5 -g 50

Change the color of the wireframe and the surface

Synopsis for changing the surface color: -cf rv,gv,bv Specify integer number range from 0 to 255 in rv, gv, and bv

Synopsis for changing the wireframe color: -cl rv,gv,bv Specify integer number range from 0 to 255 in rv, gv, and bv

rv, gv and bv mean the red, green, and blue value, respectively. -cf 50,200,80 and -cl 0,0,0 are used as default.


hfp example1.hf -cf 255,255,0
hfp example1.hf -cl 0,255,255 -d 1
-cf 255,255,0 -cl 0,255,255 -d 1

The following table shows examples of color values

examples of color values

For the other options, see README.txt file obtained with HyperFun Polygonizer.

hyperfun/tut_poly.txt ยท Last modified: 2020/12/31 10:49 by