antiprism-0.23
Up Next

# canonical - canonicalize a polyhedon

Usage | Examples | Notes

## Usage

    Usage: canonical [options] [input_file]

    Read a polyhedron from a file in OFF format. Canonicalize or planarize it.
    Uses algorithms by George W. Hart, http://www.georgehart.com/
    http://www.georgehart.com/virtual-polyhedra/conway_notation.html
    http://www.georgehart.com/virtual-polyhedra/canonical.html
    If input_file is not given the program reads from standard input.

    Options
      -h,--help this help message (run 'off_util -H help' for general help)
      --version version information
      -n <itrs> maximum number of iterations (default: no limit)
      -l <lim>  minimum distance change to terminate, as negative exponent
                   (default: 12 giving 1e-12)
      -d <int>  divergence test. 0 for no test. (default 10)
      -M <mthd> canonicalizing method,
                m - mathematica version of canonicalization (default)
                n - conway notation version of canonicalization
                l - mathematica planarize portion only
                p - conway notation planarize (face centroids reciprocal)
                q - conway notation planarize (face centroids magnitude reciprocal)
                x - face centroids only (no reciprocal) planarize method
      -C <cent> initial 'centering'
                x - none, c - centroid (-M p and -M l default)
                s - centroid and project vertices onto a sphere (-M m default)
                p - centroid and pre-planarized (-M n default)
                q - centroid and pre-planarized with magnitude reciprocal
      -z <n>    status reporting every n lines. -1 for no status. (default 50)
      -o <file> write output to file (default: write to standard output)

    Mathematica Canonicalize Options (-M m and -M l)
      -e <perc> percentage to scale the edge tangency error (default: 50)
      -p <perc> percentage to scale the face planarity error (default: 20)

    Pre-planarization Options (-C p and -C q)
      -i <itrs> maximum number of pre-planarize iterations (default: no limit)

## Examples

Make a cube, distort it, and canonicalize it back into a cube

    off_util cube | off_trans -S 1,2,3 | canonical | antiview

Make a geodesic sphere, canonicalize it, and add it to it reciprocal

    geodesic -c 2 ico | canonical | pol_recip -a | antiview

## Notes

The program will not always converge, and produce the canonical form. In this cases it may help to distort the polyhedron before running canonical. This could be done with off_util -S, repel, minmax, off_trans or even editing the OFF file by hand.

George Hart has a page on canonicalization.

Uses algorithms by George W. Hart, http://www.georgehart.com/. The 'Mathematica' algorithms have been written to follow George Hart's Mathematica implementation

Up: Programs and Documentation
Next: sph_rings - rings of points on a sphere