carpet - draw a smooth or block filled sheet with holes for missing data

Name

carpet  - draw a smooth or block filled sheet with holes for missing data

Type

  mapper, C

Author

Ian Curington, Advanced Visual Systems, Inc.
Source: carpet.c

Description

------------
  A Carpet Plot surface is made showing surface height variation
  from one field, with color variations from data in a second field.
  Each cell is drawn as per field to mesh, (linear interpolation),
  or in block mode with descrete non-interpolated colors.
  In block or smooth mode, it will optionally leave holes in the carpet
  where the data goes out of range for the colormap, allowing
  mask values to control cell visibility, or region boundaries.
  Version 3 allow irregular surfaces and smooth-holes.

Inputs


  Field 1:
    "field 2D uniform/irregular scalar float"
    This controls the height map of the surface.
    It also controls the color variation, if no
    field 2 is present.
    Can be 2-space or 3-space.
  Field 2:
    If present, this field overrides the color, so
    two independent variables can be displayed in the same plot.
    This field must match the X and Y dimensions of field 1.
  Colormap:
    This controls the surface color variation applied to the
    input scalar field. The hi-low dials of the colormap field
    are used to match the field. These controls can control
    cell visibility when in "leave holes" mode.

Parameters


-----------
Z-Scale
  This controls the relative offset from the base plane of each
  cell, creating the wavy carpet effect.
Smooth-Block
  In smooth mode, it builds the same structure as field_to_mesh,
  a fully connected lattice of points, with linear interpolation
  of both color and shape. In block mode, the shape is the same,
  but the color is broadcast to all vertices of each face from the
  first corner, ignoring data in the last row and column.
  It also generates a lot more polygons in block mode.
Flip Normal
  This controls a 180 degree flip in the surface normal,
  which will effect the lighting on the surface.
Leave Holes
  This will allow drop outs in the field where the 2nd field
  values go out of range for the colormap. This only works in
  block mode, and when 2nd port data is present.

Example network

----------------
                  Read Image (=avs.x)
                     |
                  Downsize    = 12
                     |
                  field to float
                  |         |
      extract scalar      extract scalar
                  |         |
gen colormap      |         |
       |          |         |
       |          |         |
       --------   |  -------|  
              |   |  |
               carpet
                  |
               geometry viewer