ČeskyČesky

HTGEN - Hopfield Triangle Strip GENerator

HTGEN is an ANSI C program for generating triangle strip representations of triangulated surface models on the basis of a method introduced in which uses a linear-time reduction to the minimum energy problem in Hopfield network. The input for HTGEN is an object file in the Wavefront .obj format describing a triangulated surface model by a list of geometric vertices with their coordinates followed by a list of triangular faces each composed of three vertex reference numbers. The program generates the corresponding Hopfield network which then computes a stripification for the model. The stripification is extracted from final stable state of the network into an output .objf format file containing a list of triangle strips together with vertex data (the .objf format is a variant of the Wavefront .obj format which includes the data type for triangle strips).

As an example, a stripification provided by HTGEN of the well-known triceratops model is shown in the following picture.

Stripification of the triceratops model

Download and installation

  1. Download and expand the file htgen-src.zip. Move the resulting folder to your preferred location.
  2. Descend into the HTGEN source directory and run make:
    	cd your-location/htgen-src/
    	make
    
    This will create the executable named htgen.
  3. Run htgen to perform stripifications, see below for the correct syntax.

Usage of HTGEN

The syntax for running HTGEN is as follows:
./htgen | ./htgen <input obj file> <output objf file> [<number of trials> [<initial temperature> [<stopping criterion>]]]
The optional parameters control the simulated annealing used for the computation, their default values are 10, 10, and 0.3, respectively. The stopping criterion is the maximum percentage of unstable units that still results in terminating of the computation.

Running ./htgen without any parameters causes HTGEN to write a short information on correct syntax.