Antiprism Up Next
Home
Programs
Examples
Album
Download
Project
Forum
About

canonical - canonicalize a polyhedon

Usage    |    Examples    |    Notes

Usage

Synopsis

canonical [options] [input_file]

Description

Read a polyhedron from a file in OFF format. Canonicalize or planarize it.

Uses algorithms by George W. Hart, http://www.georgehart.com/.

Options

input_file
input file in OFF format, or if not given the program reads from standard input

-h
program help

-n <iters>
maximum number of iterations (default: no limit)

-l <lim>
minimum distance change to terminate, as negative exponent 1e-lim (default: 13 giving 1e-13)

-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, if this option is not used the program writes 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)

-j <lim>
minimum distance change to terminate pre-planarize, as negative exponent 1e-lim (default: 13 giving 1e-13)

Examples

Make a cube, distort it, and canonicalize it back into a cube
   unipoly cube | off_trans -S 1,2,3 | canonical > canonic_cube.off

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.

The 'Mathematica' algorithms have been written to follow George Hart's Mathematica implementation

The 'Conway Notation' algorithms have been adapted from the Javascript on George Hart's Conway Notation page.


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


Home   |   Programs   |   Examples   |   Album   |   Download   |   Project   |   Forum   |   About

Contact: adrian@antiprism.com      -      Modified 18.12.2007