Antiprism Up Next
Home
Programs
Examples
Album
Download
Development
Forum
About

poly_form - make face-regular and unscramble models

Usage    |    Examples    |    Notes

Usage



Usage: poly_form [options] [input_file]

Read a file in OFF format containing a graph of a polyhedron, with or
without vertex coordinates, and try to create a spherical or ellipsoidal
tesselation where the maximum edge is a minimum length, or try to make
into a regular-faced polyhedron. Option adjustment factors expressed as
a percentage are approximate. 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
  -a <alg>  model forming algorithm
            r - make faces into unit-edged regular polygons (default)
            u - unscramble: place a small polygon on one side of a
                sphere or ellipsoid and the rest of the vertices at a
                point on the other side, then equalise shortest and
                longest edges attached to a vertex
            U - equalise shortest and longest edges attached to a vertex
                  on sphere or ellipsoid (use to continue unscrambling)
            e - equalise edges on sphere or ellipsoid (default)
            p - planarise
  -n <itrs> maximum number of iterations, -1 for unlimited (default: 10000)
  -s <perc> percentage to shorten longest edges on iteration (default: 1)
  -k <perc> -a r - percentage to reduce polygon radius on iteration
                   (default: value of -s)
            -a e - percentage to reduce minimum target length on iteration
                   (default: 1e-6), will oscillate at certain precision,
                   process output with smaller value to improve solution
  -f <perc> percentage to reduce distance of vertex from face plane (-a rp)
            on iteration (default: value of -s)
  -y        maintain symmetry of the base model (with -a e/r/p)
  -E <prms> use ellipsoid, three numbers separated by commas are the
            axis lengths (for a superellipsoid an optional fourth number
            gives the power)
  -l <lim>  minimum change of distance/width_of_model to terminate, as 
               negative exponent (default: 14 giving 1e-14)
  -z <nums> number of iterations between status reports (implies termination
            check) (0 for final report only, -1 for no report), optionally
            followed by a comma and the number of iterations between
            termination checks (0 for report checks only) (default: 1000,100)
  -o <file> write output to file (default: write to standard output)

Examples

Turn an icosahedron 3-fold axis into a six-fold axis, and make the resulting faces regular
off_trans -y D3v ico | to_nfold 6 | poly_form -s 15 | antiview


Make the faces of a (3,5) icosahedral geodesic sphere into regular triangles, while ensuring that the icosahedral symmetry is maintained, set -n and -l higher for a better solution
poly_form -n 100000 -s 15 -l 14 -y geo_5_3 | antiview


Make a geometric representation of a polyhedron having only face data, in this case a geodesic sphere has all its coordinates set to the origin and is then laid out again on a sphere
off_trans geo_3 -S 0 > scrambled.off
poly_form -a u scrambled.off > unscrambled.off


Run for a bit longer if necessary, don't use -a u this time as this includes an initial placement, instead use just the unscrambling algorithm -a U
poly_form -n 100000 -a U unscrambled.off > unscrambled2.off


Make an equal edge tiling on a sphere, and use -y to constrain to the original symmetry, which may also be faster
poly_form -n 100000 -a e -s 100 geo_3_3_d | antiview
poly_form -n 100000 -a e -s 100 -y geo_3_3_d | antiview


An equal-edge tiling on a sphere may not be solvable, but the result might still be symmetric, which could then be used to speed up a regular-faced solution
poly_form -a u geo_3_3 | poly_form -a e -s 100 | antiview -s a
poly_form -a u geo_3_3 | poly_form -a e -s 100 | poly_form -n -1 -y | antiview


Solve an equal-edge model on an ellipsoid
poly_form -n 100000 -a e -E 1,1.2,1.5 -y -s 50 geo_3_3_d | antiview


Notes

Doesn't always succeed. Experiment with option -s, -k and -f to improve convergence, but setting them too high may cause the model to scramble. Run the program for longer by increasing option -n. The program shows the progress every 1000 iterations (change with option -z) by printing the longest and shortest edge lengths and/or the maximum distance a vertex moved.

Option -y constrains the symmetry of a model, and will also complete quicker for models with good symmetry and a large number of elements.

The program was previously called minmax, but includes various changes. Option -p is gone, for -p u use -a u. Option -a parameters are renamed: -a u is now -a r (and is the default), -a v -p u is -a u, and -a v is -a U for unscrambling and -a e for equalising edges. Option -L is gone, and option -l is now used to specify precision (an option for lengthening edges is no longer needed). The default for -n is raised to 10000


     Next: col_util - colour utilities including plots and blends
     Up: Programs and Documentation


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

Contact: adrian@antiprism.com      -      Modified 1.6.2022