/usr/share/dx/samples/scripts/Inquire is in dxsamples 4.2.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | // In this example, we use Inquire to determine if an input data field is
// scalar or vector. If it's vector, we extract the x component for
// visualization using Isosurface. Otherwise, we use the original data field.
macro contour(data)
{
scalar = Inquire(data,"is scalar");
output = Compute("$0 ? $1 : [$1.x]", scalar, data);
contours = Isosurface(output, number = 3);
camera = AutoCamera(contours);
switchnumber = scalar+1;
caption1 = Caption("vector field");
caption2 = Caption("scalar field");
caption = Switch(switchnumber, caption1, caption2);
collected = Collect(caption, contours);
Display(collected,camera);
}
scalarfield = Import("watermolecule");
vectorfield = Gradient(scalarfield);
scalarslice = MapToPlane(scalarfield);
vectorslice = MapToPlane(vectorfield);
contour(scalarslice);
contour(vectorslice);
|