===== Brief reference of HyperFun Polygonizer ===== In this reference, we use example1.hf created in [[tut_start|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. {{http://hyperfun.org/Tut_HTML_e/images/poly_sample1.jpg?nolink}} ==== 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. {{http://hyperfun.org/Tut_HTML_e/images/poly_sample2-1.jpg?nolink}} You can also show and hide these from the menu. {{http://hyperfun.org/Tut_HTML_e/images/poly_sample2-2.jpg?nolink}} ==== 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. {{http://hyperfun.org/Tut_HTML_e/images/poly_sample3-1.jpg?nolink}} -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. {{http://hyperfun.org/Tut_HTML_e/images/poly_sample3-2.jpg?nolink}} ==== 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)). Examples: hfp example1.hf -b 5,5,5 -sb hfp example1.hf -b 4,4,4 -sb |{{http://hyperfun.org/Tut_HTML_e/images/poly_sample4.jpg?nolink}}|{{http://hyperfun.org/Tut_HTML_e/images/poly_sample5.jpg?nolink}}| | -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. Examples: hfp example1.hf -g 5 -d 5 hfp example1.hf -g 50 -d 5 |{{http://hyperfun.org/Tut_HTML_e/images/poly_sample6.jpg?nolink}}|{{http://hyperfun.org/Tut_HTML_e/images/poly_sample7.jpg?nolink}}| | -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__. Examples: hfp example1.hf -cf 255,255,0 hfp example1.hf -cl 0,255,255 -d 1 |{{http://hyperfun.org/Tut_HTML_e/images/poly_sample8.jpg?nolink}}|{{http://hyperfun.org/Tut_HTML_e/images/poly_sample9.jpg}}| | -cf 255,255,0 | -cl 0,255,255 -d 1 | The following table shows examples of color values |red|255|0|0| |green|0|255|0| |blue|0|0|255| |yellow|255|255|0| |magenta|255|0|255| |cyan|0|255|255| |black|0|0|0| |white|255|255|255| ^ examples of color values ^^^^ For the other options, see README.txt file obtained with HyperFun Polygonizer.