Up
Next
canonical - canonicalize a polyhedon
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/.
- input_file
- input file in OFF format, or if not given the program reads from stdin
- -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)
Make a cube, distort it, and canonicalize it back into a cube
unipoly cube | off_trans -S 1,2,3 | canonical > canonic_cube.off
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.
Up:
Programs and Documentation
Next:
sph_rings - rings of points on a sphere
Antiprism Documentation 18.12.2007 -
http://www.antiprism.com/