DVslice_rect


Synopsis

extract a 2D slice from a rectilinear field using an arbitrarily oriented slice plane


group DVslice_rect {
Mesh_Rect+Dim3+Node_Data+Iparam &in { /* rectilinear input field */
nnodes+req;
};
Plane_Grid+Xform+Iparam &plane; /* slice plane */
float+notify+IPort2 dist; /* plane distance */
int+Iparam map_comp[];
Mesh_Rect+Dim2+Node_Data+Oparam out; /* output field */
method+notify_val+notify_inst upd_slice = "slice";
};

Description

DVslice_rect extracts an arbitrarily-oriented 2D slice of data from a 3D rectilinear mesh field. Any number of components can be extracted. Output is generated every time the slice plane moves.

Input

&in

The input is a reference to a field that must be a 3D field (Dims3) with a rectilinear mesh (mesh type Mesh_Rect) and any type of Node_Data.

&plane

A reference to a Plane_Grid object that will be the slicing plane. This could be generated by the plane object found in Geometries.Plane, or it could be any 2D Mesh_Unif. The plane object generated by Geometries.Plane's advantage is that its plane object has its own Plane Transformation panel that controls plane rotation, translation, and scale, as well as controls to specify its size when it is connected to the Module Stack object.

 

dist

A float. This value will move the plane through the field perpendicular to the plane. Though the Plane Transformation panel has X, Y, and Z transformation controls, it is usually easier to use plane's controls to orient and size the plane, but use this plane distance control to move the plane. DVslice_rect generates output whenever the slice plane moves.

map_comp[]

An integer array. Each array value is the number (from 0 up) of a component to extract. For example:

(a, b, c, [e, f, g]) --> set map_comp = {0, 3} --> (a, [e, f, g]) in the output field

Note that this array is not explicitly dimensioned. It is a variable-length array that will have as many values as you assign to it with the = { n, n, n,...n} notation. The supplied AVS/Express modules that use DVslice_rect implicitly set the dimension to 1 by specifying map_comp = {0}, i.e., the user can specify any one component to send to the output field, and the default is the first (0th) component.

Output

out

The output is a new object. It contains a new, subsetted 2D Mesh_Rect and a new Node_Data of the selected components' slices. Where the slice plane does not land exactly on a node, the data value is interpolated from the values of the adjacent nodes.

Algorithm

DVslice_rect uses trilinear interpolation to interpolate values between mesh nodes.

Files

v/dv.v
modules/slice.c

Example

Libraries.Main.Mappers.slice

See also