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

visage_vector(visage)Scientific Visualizationvisage_vector(visage)

NAME

visage_vector - VISAGE object to represent vector data

DESCRIPTION

The visage_vector object is a data object that represents and provides methods for vector data. Vector data is generally associated with a geometry (e.g., structured_grid_set) and provides a triplet of values for each point in the geometry.

Note that since visage_vector object inherits methods from visage_data, it is possible to represent complex, time varying data.

SUPERCLASS

visage_data

INSTANCE VARIABLES

(Inherited form superclass.)

MESSAGES

max_length? Get the maximum (Euclidean square root os sum of squares) length of the vector data.

compute_max_length! Traverse the vector data to determine the length of the largest vector.

compute_properties! Compute all the properties of the data. In this case, determine the max_length.

EXAMPLE

The following example illustrates the use of the visage_vector object in a complex script.

/* * Create structured grid */ structured_grid_set new: grid dimensions= (2,3,4); grid data=(0., 0., 0., 1., 0., 0., 0., 1., 0., 1., 1., 0., 0., 2., 0., 1., 2., 0.) data+(0., 0., 1., 1., 0., 1., 0., 1., 1., 1., 1., 1., 0., 2., 1., 1., 2., 1.) data+(0., 0., 2., 1., 0., 2., 0., 1., 2., 1., 1., 2., 0., 2., 2., 1., 2., 2.) data+(0., 0., 3., 1., 0., 3., 0., 1., 3., 1., 1., 3., 0., 2., 3., 1., 2., 3.) ; /* * Vector data */ visage_vector new: velocity;

velocity data= (0., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 3.) data+ (1., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 3.) data+ (2., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 3.) data+ (2., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 3.) data+ (2., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 3.) data+ (3., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 3.) ; /* * Scalar data */ visage_scalar new: pressure; pressure data=(0., 0., 0., 1., 0., 0., 0., 2., 0., 0., 0., 3.) data+ (1., 1., 1., 2., 1., 1., 3., 2., 1., 1., 1., 3.) ; /* * Create a data set. Here the display classes are used. */ visage_data_set new: adata_set geometry= grid scalar_data= pressure vector_data= velocity ; /* * Now create a visual image */ /* * Create an outline */ display_outline new: an_outline data_in= adata_set generate_data! ; display_lines new: draw_outline data_in= an_outline ; actor new: outline_actor modeller=draw_outline ; /* * Create a geometry */ display_geometry new: a_geometry extent=(1,1,1,3,1,4) data_in= adata_set ; display_surface new: draw_surface data_in= a_geometry ; actor new: geometry_actor modeller=draw_surface ; /*

* Create an iso-surface */ display_iso_surface new: iso value=2.0 data_in= adata_set ; display_surface new: draw_iso data_in= iso ; actor new: iso_actor modeller=draw_iso ; /* * Set up lights and stuff */ collection new: data members=([visage_data instances?]) compute_properties! ; vector new: bbox dimension=6; bbox = ([grid bbox?]); camera new: acamera position= (1,1,1) focal_point= ([grid center?]) x_range=([bbox @1 ?],[bbox @2 ?]) y_range=([bbox @3 ?],[bbox @4 ?]) z_range=([bbox @5 ?],[bbox @6 ?]) default! zoom: 1.4 on! ; light new: alight position= ([acamera position?]) on! ; /* * Create renderer. The environment variable LYMB_RENDERER should be * set appropriately (e.g., vogle_x11, starbase, phigs, etc.) */ logic new: _test; environment new: _env variable="LYMB_RENDERER"; _test = [_env defined?] false: "#Environment variable LYMB_RENDERER must be set." false: "parser exit!;" ; string new: current_renderer = [_env value?];

object# current_renderer new: main_renderer actors=([actor instances?]) lights=alight cameras=acamera ; /* * Draw the picture */

main_renderer render!;

SEE ALSO

visage_data, plot3d_reader, netcdf_reader, visage_scalar, visage_data_set


Please send comments and suggestions to
consult@rpi.edu