<<<<<<<<<<<<<<<<<

data_probe(display) Display data_probe(display)

NAME

data_probe - probe data set for scalar and vector values

DESCRIPTION

Data_probe takes a data set (e.g., visage_data_set, plot3d_data_set, etc.) and a source display_data as input and creates a display_data as output. The output display_data maintains the same geometry representation as the source but its scalar and vector data are interpolated from the input data set.

SUPERCLASS

computed_feature

INSTANCE VARIABLES

source the name of an input display_data

MESSAGES

source= name Set the name of the source display data (or filter). If not provided, the output display_data will be empty.

source? Get the name of the source display data.

mtime? Get the modified time of the data_probe taking into account the modified time of both the input data set and source display data.

EXAMPLE

In this example a plot3d data file is read and an outline and a probe are created. The probe source is a plane modeller, which creates a nxn grid points and corresponding polygons. Also note that the transform filter is used to orient the plane modeller inside the data set.

/* * Script to illustrate use of probe object */

string new: data_name=case1;

string new: data_set = data_name + "_gridset01"; string new: geometry = data_set + "_grid"; string new: scalar_data = data_set + "_density"; string new: vector_data = data_set + "_momentum";

plot3d_reader new: areader file_prefix=data_name derived_data_off! read! ;

object# data_set scalar_data= scalar_data vector_data= vector_data compute_properties! ;

/* * Compute the initial threshold and other parameters */

scalar new: current_scale= 0.1 * [object# geometry length?] / [object# vector_data max_length?] ; vector new: range dimension=2 = ([object# scalar_data minmax?]) ; /* * Pipeline: outline plus probe. */ display_outline new: outline data_in= data_set ; display_lines new: draw_outline data_in=outline ; actor new: outline_actor modeller=draw_outline color=(0,0,0) ;

plane_modeller new: source resolution=6 ; plane_modeller new: source2 resolution=1 ; transform_filter new: xform data_in=source position=(10.2,0,30.3) position+ (-5,-5,0) scale=(6,6,6) rotate_x: 33 rotate_y: 27 ; transform_filter new: dummy data_in=source2 position=(10.2,0,30.3) position+ (-5,-5,0) scale=(6,6,6) rotate_x: 33 rotate_y: 27 ; display_all new: draw_dummy

data_in=dummy ; actor new: dummy_actor modeller=draw_dummy color=(0,0,1) wireframe! ; data_probe new: probe data_in= data_set source=xform ; contour_filter new: cf data_in= probe number_contours=80 range=range ; display_lines new: draw_probe data_in= cf range= range ; actor new: probe_actor modeller=draw_probe ;

/* * Renderer stuff */ environment new: _env variable="LYMB_RENDERER"; string new: current_renderer = [_env value?];

light new: alight on!;

vector new: bbox dimension=6; bbox = ([object# data_set bounds?]); camera new: acamera position=(1,1,1) x_range=([bbox @1 ?],[bbox @2 ?]) y_range=([bbox @3 ?],[bbox @4 ?]) z_range=([bbox @5 ?],[bbox @6 ?]) default! on!;

object# current_renderer new: main_renderer actors=([actor instances?]) lights=alight cameras=acamera background=(.64,.58,.5) ;

main_renderer render!; /* * Create a control panel to manipulate object */

environment new: _display variable="DISPLAY";

logic new: test; test = [_display defined?] false: "# Please define DISPLAY variable" false: "ui exit!;" true: "ui on! start!;

SEE ALSO

computed_feature, data_outline, plot3d_reader, display_data


Please send comments and suggestions to
consult@rpi.edu