Antiprism Up Next
Home
Programs
Examples
Album
Download
Development
Forum
About

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
  -e <opt>  edge distribution (default : none)
               s - project vertices onto a sphere
  -r <opt>  initial radius
               e - average edge near points radius = 1 (default)
               v - average vertex radius = 1
               x - not changed
  -C <opt>  initial centering
               e - edge near points centroid (default)
               v - vertex centroid
               x - not moved
  -p <opt>  planarization (done before canoncalization. default: none)
               p - face centroids (magnitude squared)
               q - face centroids (magnitude)
               f - face centroids
               m - mathematica planarize
               a - sand and fill planarize
               u - make faces into unit-edged regular polygons (minmax -a u)
  -i <itrs> maximum number of planarize iterations (default: no limit)
  -c <opt>  canonicalization
               m - mathematica version (default)
               b - base/dual version (reciprocate on face normals)
               a - moving edge version
               x - none (default, if -p is set)
  -n <itrs> maximum number of canonical iterations (default: no limit)
  -O <args> output b - base, d - dual, i - intersection points (default: b)
               n - base edge near points, m - dual edge near points
               p - base near points centeroid, q - dual near points centroid
               u - minimum tangent sphere, U - maximum, o - origin point
               s - base incircles, S - rings, t -dual incircles, T -rings
  -q <dist> offset for incircles to avoid coplanarity e.g 0.0001 (default: 0.0)
  -x <opt>  Normals: n - Newell's, t - triangles, q - quads (default: Newell's)
  -d <perc> radius test. precent difference between minumum and maximum radius
               checks if polyhedron is collapsing. 0 for no test (default: 80)
  -z <n>    status reporting every n lines. -1 for no status. (default: 1000)
  -l <lim>  minimum distance change to terminate, as negative exponent
               (default: 12 giving 1e-12)
  -o <file> write output to file (default: write to standard output)

Mathematica Canonicalize Options (-c m and -p m)
  -E <perc> percentage to scale the edge tangency error (default: 50)
  -P <perc> percentage to scale the face planarity error (default: 20)
  -A        alterate algorithm. try if imbalance in result (-c m only)

Coloring Options (run 'off_util -H color' for help on color formats)
  -I <col>  intersection points and/or origin color (default: yellow)
  -N <col>  base near points, centroid, incircles color (default: red)
  -M <col>  dual near points, centroid, incircles color (default: darkgreen)
  -B <col>  base edge color (default: unchanged)
  -D <col>  dual edge color (default: unchanged)
  -U <col>  unit sphere color (default: white)
  -T <tran> base/dual transparency. range from 0 (invisible) to 255 (opaque)


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 -O bd | 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


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


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

Contact: adrian@antiprism.com      -      Modified 15.10.2017