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

unstructured_point_set(visage)VISAGEunstructured_point_set(visage)

NAME

unstructured_point_set - VISAGE geometry data for unstructured points.

DESCRIPTION

The unstructured_point_set object represents geometry as points. The points can be defined in two ways: 1) defined by a positive, arbitrary integer id and a triplet of floats representing position, and 2) implicitly, as an ordered set of x,y,z triplets. See the unstructured_grid_set for more information.

The unstructured_point_set has a single important method: triangulate!. In this method the points are connected by using a triangulation algorithm to generate tetrahedron, triangle, or line output. By default, the triangulation method is Delaunay triangulation, although other triangulation objects can be provided. See the delaunay man page for more information about this algorithm.

Once the unstructured_point set is triangulated, elements can be manipulated using the methods of the unstructured_grid_set (since the unstructured_point_set is a sub- class of the unstructured_grid_set).

SUPERCLASS

unstructured_grid_set

INSTANCE VARIABLES

triangulator name of the object providing triangulation technique. By defulat the delaunay object is created and used.

MESSAGES

triangulate! triangulate the points in the input data set and generate element connectivity. By default the Delaunay object is created and used to generate the triangulation.

points=, points+ (x1,y1,z1,x2,y2,z2,...) or ptr An alternative method to set/add nodes to the unstructured grid based on implicit numbering (see nodes=/+ as well). If the data on the argument stack is a list of floats, then memory is allocated internally and the values are copied in. If the data on the argument stack is a pointer (i.e., ptr), then the pointer use is registered. Caution: do not set/add more than ~100 nodes in a single lymb statement - the statement may get too long and the parser might break. Use multiple add methods instead.

bbox= (xmin,ymin,zmin, xmax,ymax,zmax) Set the bounding box.

bbox? Get the bounding box.

bounds= (xmin,ymin,zmin, xmax,ymax,zmax) Set the box within which data is visible.

bounds? Get the visible bounds of the data.

center= (x,y,z) Set the center of the data.

center? Get the center of the data.

compute_bbox! Compute the bounding box for the data.

compute_center! Compute the center of the bounding box.

compute_bbox! Compute the length of the bounding box.

compute_properties! Compute the properties for this data (bounding box, center, length).

nodes=, nodes+ (id1,x1,y1,z1,id2,x2,y2,z2,...) One of two methods to set/add nodes to the unstructured point set. Id's must be > 0. Caution: do not set/add more than ~100 nodes in a single lymb statement - the statement may get too long and the parser might break. Use multiple add methods instead.

no_nodes? Get the number of nodes in the unstructured point set.

no_elements? Get the number of elements in the unstructured grid.

elements_on! Turn on all elements.

elements_off! Turn off all elements.

elements_on= (e1,e2,...) Turn on only the elements listed.

elements_on+ (e1,e2,...) Turn on the elements listed (in addition to any others already on).

elements_on- (e1,e2,...) Turn off the elements listed.

elements_and: (e1,e2,...) Turn on the elements that are listed and already turned on.

element_list= (min,max,increment) Turn on only those elements between min and max (inclusive) by increment.

element_list+ (min,max,increment) Turn on the elements between min and max (inclusive) by increment in addition to any other elements turned on.

element_list- (min,max,increment) Turn off the elements between min and max (inclusive) by increment.

element_list_and: (min,max,increment) Turn on only those elements between min and max (inclusive) by increment and those already on.

EXAMPLE

The following example shows a script fragment for creating an unstructured point set. An initial set of 100 points is generated using a random number generator and then triangulated.

/* * Generate 1000 random points (using x**2 + y**2 + z**2 = 1) and triangulate */ scalar new: no_pts = 1000;

scalar new: x; scalar new: y; scalar new: z;

unstructured_point_set new: ups ; visage_scalar new: s ; visage_vector new: v ;

scalar new: rand;

loop new: l resolution=1

duration=no_pts start_actions=` logic new: test; ' tick_actions=` rand = [l time?] + 1; x drand48!; y drand48!; test greater: (y,[expr=`1-(x*x)' ?]) true: `y = [expr=`1-(x*x)' ?];' ; z drand48!; test greater: (z,[expr=`1-(x*x)-(y*y)' ?]) true: `z = [expr=`1-(x*x)-(y*y)' ?];' ; ups nodes+ (rand, x, y, z); s data+ [rand drand48?]; ' start! ; ups print:no_points ; s print:size; ;

visage_data_set new: vds geometry=ups scalar_data=s ;

delaunay new: del debugon! data_in= vds ;

data_geometry new: dg data_in= del ;

display_all new: draw_mesh data_in= dg range= (0,1) ;

actor new: a modeller= draw_mesh ;

renderer new: aren actors= [actor instances?] render! ;

loop new: rotate duration=100000 tick_actions=` a rotate_x: 5 rotate_y:3 rotate_z:1; aren render!; ' ;

SEE ALSO

delaunay, unstructured_grid_set, netcdf_reader, visage_data_set


Please send comments and suggestions to
consult@rpi.edu