Antiprism Up Next

planar - convert overlapping coplanar polygons to tiles

Usage    |    Examples    |    Notes


Usage: planar [options] [input_file]

Read a file in OFF format and convert overlapping coplanar polygons into
non-overlapping polygon tiles. If input_file is not given the program 
reads from standard input.

  -h,--help this help message (run 'off_util -H help' for general help)
  --version version information
  -l <lim>  minimum distance for unique vertex locations as negative exponent
               (default: 12 giving 1e-12)
  -o <file> write output to file (default: write to standard output)
Scene Options
  -M <mode> color system mode. HSV=1, HSL=2, RGB=3 (default: 2)
  -d <opt>  blend overlapping (tile) or adjacent (merge) planar faces  
               tile=1, merge=2 (default: none)
  -p <opt>  polygon fill algorithm.  angular=1, modulo2=2 (pnpoly)
               triangulation=3, even_overlap=4, alt_modulo2=5 (default: 1)
  -S        stitch seams created by tiling or merging
  -R        split pinched faces
  -r        rebuild compound model to separate vertices
  -I        rid faces of extra in-line vertices
  -e <opt>  blend existing explicit edges and/or vertices using blend options
               e - edges, v - vertices, b - both (-d forces b, otherwise none)
  -E <opt>  remove explicit edges, blend new ones using face colors (sets -S)
               e - edges only, v - also blend vertices (default: none)
               V - also blend invisible vertices, s - strip edges and vertices
  -c        CMY mode. Complementary colors.  RGB->(RYB/GMO)->CMY->blend
  -b <val>  brightness adjustment for areas of blended colors
               valid values -1.0 to +1.0 (default: no adjustment)
               negative for darker, positive for lighter
               at 0, an area with 2 blended colors will not change
               but areas with 3 or more will become slightly darker

Winding Options
  -w <opt>  winding rule, include face parts according to winding number
               odd, even, positive, negative, nonzero, zero (default: none)
               zodd, zeven, zpositive, znegative (includes zero)
               or symbol proceeding integer: eq, ne, gt, ge, lt, le  meaning
               equal, not equal, greater than, greater than or equal, less
               than, less than or equal. use 'a' for absolute value  e.g. gea2
  -z        use direction of normals for hemispherical winding numbers
  -D        delete invisible faces created by winding rule
  -O <opt>  orient the faces first (if possible) then for volume
               positive=1, negative=2, reverse=3, or use flip=4
               which reverses the orientation of the model as it was input
  -C <xyz>  center of model for normals, three comma separated coordinates
               0 for origin  (default: centroid)
  -H        turn off hole detection
  -V        verbose output (list of winding numbers)

Color Blending Options (for option -d, -M 1,2)
  -s <sat>  HSV/HSL saturation curve. Greater than 0 (default: 1)
               1.0 - no curve. lower than 1.0 makes blends more pastel
  -t <val>  HSV/HSL threshold to use average saturation (default: 1)
               between 0.0 (all averaging) and 1.0 (no averaging)
  -v <val>  HSV/HSL value curve. Positive integer (default: 0)
               simulates subtractive coloring for blending 3 or more colors
               RGB: Red+Green+Blue = White   Cyan+Magenta+Yellow = Black
               RYB: Red+Yellow+Blue = Black  Green+Magenta+Orange = White
               1.0 - no curve. lower than 1.0 number makes blends lighter
               0.0 - use average value instead
  -u <val>  HSV/HSL value advance. Rotates meaning of white and black
               valid values 0.0 to 120.0 degrees (default: 0)
  -a <int>  alpha for blend. average=1, minimum=2, maximum=3 (default: 3)
  -y        RYB mode. Blend colors as in Red-Yellow-Blue color wheel

Coloring Options (run 'off_util -H color' for help on color formats)
  -f <opt>  take face colors from map (processed before -d)
               n - unique color for faces with same normals
               p - unique color for faces on same planes only
               o - unique color for faces on same and opposite normals
  -T <tran> face transparency. valid range from 0 (invisible) to 255 (opaque)
  -Z <col>  color for areas found colorless by winding (default: invisible)
               keyword: b - force a color blend
  -W <opt>  color by winding number, using maps (overrides option -f)
               w - use actual winding number
               a - absolute value of winding number
               n - negative of absolute value of winding number
  -m <maps> color maps for faces to be tried in turn (default: compound)
  -n <maps> maps for negative winding numbers (default: calculated)
               (map position zero not used for negative winding maps)


Display uniform compounds without flashing, compare the command below with antiview uc6 .
planar -d tile uc6 | antiview

Make a compound of three triangular prisms, colour faces by part, then blend the result
polygon pri 12/4 | off_color -f K | planar -d tile | antiview

Same as above, but this time merge the faces instead of tiling
polygon pri 12/4 | off_color -f K | planar -d merge | antiview

Make a compound of four 5/2 star prisms, coloured by compound and blended using RGB. Edges are also blended
planar -d tile -M rgb uc21_n5/2k4 -E e | antiview -v 0.01

Same as above but edges and vertices are supressed in antiview
planar -d tile -M rgb uc21_n5/2k4 | antiview -x ve

Same as above but modulo2 faces are made invisible
planar -d tile -M rgb -p 2 uc21_n5/2k4 | antiview -x ve

The faces of uniform compound 75 are colored by winding number
planar -d tile -W w -m map_white:red uc75 | antiview -x ve


Overlapping coplanar polygons of different colours are not generally handled well by display programs. In antiview, for example, the colour of the overlapping region may switch rapidly as a model is rotated, producing a flashing effect. The planar program provides a solution to this by replacing the regions of overlap with non-overlapping polygons. The new polygons may be coloured with a blend of the colours from the overlapping polygons.

planar was written by Roger Kaufman.

     Next: off_report - report global measures maxima and counts
     Up: Programs and Documentation

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

Contact:      -      Modified 27.3.2019