window3d

Description

window3d extends window2d by applying the same xy polygon along a vertical interval. Query coordinates use trilinear interpolation.

Blendfile rows contain:

<polygonfile> <zlo> <zhi> <xfunction>/<yfunction>/<zfunction> <rx1>/<rx2>/<ry1>/<ry2>/<rz1>/<rz2>

The xy polygon follows the same validity and strict boundary-assembly rules as window2d after it is snapped to the local support grid. Use -N with -M to write each modified polygon to names such as south_america_monotone.txt.

Usage

blend window3d - Generate 3-D blending weights

usage: blend window3d -R<xmin>/<xmax>/<ymin>/<ymax>/<zmin>/<zmax> -I<dx>[/<dy>[/<dz>]]
       [-F<xfunction>[/<yfunction>[/<zfunction>]]] [-T<rx1>/<rx2>/<ry1>/<ry2>/<rz1>/<rz2>]
       [-B<blendfile>] [-C<f|l|o|u|a|g|p>] [-M<method>] [-N] [-V[q|e|w|t|i|c|d]]

Generate 3-D blending weights and write four columns: x y z weight. If x/y/z
query coordinates are provided on standard input, weights are returned at those
locations using trilinear interpolation from neighboring grid-point weights. If
no query points are provided, weights are written for the complete -R/-I grid.

REQUIRED ARGUMENTS:

  -R<xmin>/<xmax>/<ymin>/<ymax>/<zmin>/<zmax>, --region=<...>
     Specify the full 3-D output domain in user coordinates. Each dimension
     must satisfy min < max. Upper bounds are adjusted upward when needed so
     the domain lands exactly on the requested increment.

  -I<dx>[/<dy>[/<dz>]], --increment=<dx>[/<dy>[/<dz>]]
     Specify grid increments. If dy is omitted then dy = dx. If dz is omitted
     then dz = dx. All increments must be positive.

OPTIONAL ARGUMENTS:

  -F<xfunction>[/<yfunction>[/<zfunction>]], --function=<...>
     Select window functions used along x, y, and z for one support over the
     full -R domain [Default is cosine/cosine/cosine]. Omitted functions copy
     the x function. Run blend --show-windows to list available functions.
     This option is ignored when -B is given.

  -T<rx1>/<rx2>/<ry1>/<ry2>/<rz1>/<rz2>, --taper_ratio=<...>
     Set beginning and ending taper ratios for x, y, and z. Ratios must be
     >= 0 and < 0.5 [Default is 0.2/0.2/0.2/0.2/0.2/0.2]. This option is
     ignored for boxcar dimensions and when -B is given.

  -B<blendfile>, --blendfile=<blendfile>
     Read one or more 3-D supports from <blendfile>. Each non-empty,
     non-comment row must contain exactly five fields:
       <polygonfile> <zlo> <zhi> <xfunction>/<yfunction>/<zfunction> <rx1>/<rx2>/<ry1>/<ry2>/<rz1>/<rz2>
     where <polygonfile> is a two-column x/y vertex file contained inside -R,
     and zlo/zhi define the vertical support. Grid points outside all
     blendfile supports receive weight 0.

  -C<f|l|o|u|a|g|p>, --clobber=<mode>
     Select how overlapping support weights from -B are combined [Default is p].
       f  Use the first support listed in the blendfile.
       l  Use the lowest weight among overlapping supports.
       o  Use the last support listed in the blendfile.
       u  Use the highest weight among overlapping supports.
       a  Use the arithmetic average of overlapping weights.
       g  Use the geometric average of overlapping weights.
       p  Use the product of overlapping weights.

  -M<method>, --monotone=<method>
     Here only the 'strictly increasing' monotone condition is allowed.
     Select how non-strict xy-monotone blendfile polygons are converted before
     window assembly. If this option is omitted, polygons that are not strict
     enough for function localization are rejected. -MB is experimental and can
     produce irregular polygons that make function localization awkward.
       E  Use the strict xy-monotone envelope (i.e., convex hull) method.
       B  Use the strict highest-IoU piecewise envelope from both traversal directions,
          sampled on the -R/-I grid.

  -N, --write-monotone
     When -M modifies a polygon, write the modified polygon to a file named
     by inserting _monotone before the file extension, for example
     south_america_monotone.txt. If -N is omitted, modified polygons are used for
     weights but are not written.

  -V[level], --verbose=<level>
     Select verbosity level [w]. Choose among q, e, w, t, i, c, and d:
       q  Quiet; suppress all diagnostic messages.
       e  Error messages only.
       w  Warnings and errors [Default].
       t  Timings, warnings, and errors.
       i  Informational messages, timings, warnings, and errors.
       c  Compatibility messages and all lower verbosity messages.
       d  Debug messages and all lower verbosity messages.

  -?, --help
     Print this usage message and exit.

EXAMPLES:

  blend window3d -R0/10/0/5/0/2 -I1/1/0.5 -Fcosine/cosine/cosine
     Generate one 3-D cosine-tapered window over the full domain.

  printf '2.5 1.5 1\n' | blend window3d -R0/10/0/5/0/2 -I1 -Fboxcar/boxcar/boxcar
     Query the interpolated weight at x = 2.5, y = 1.5, z = 1.

  blend window3d -R0/10/0/10/0/5 -I0.25/0.25/0.5 -Bsupports.txt -Ca
     Read multiple polygon slabs from supports.txt and average overlaps.