AVS Modules mesh axis U.C. Berkeley, College of Chemistry 29 Feb 1992 NAME mesh axis - draw a 3D coordinate axis system over a surface mesh SUMMARY Name mesh axis Type mapper Inputs field 3D, any data; scalar float Outputs geometry Parameters _N_a_m_e _T_y_p_e normalized uniform field toggle x axis ticks slider y axis ticks slider z axis ticks slider tick size slider xz plane position slider xy plane position slider yz plane position slider Show xz plane toggle Show xy plane toggle Show yz plane toggle font size slider label precision slider x label density slider y label density slider z label density slider origin labels type-in Show labels toggle x axis min type-in x axis max type-in y axis min type-in y axis max type-in z axis min type-in z axis max type-in DESCRIPTION This module generates 3D coordinate axes for a surface mesh. It will also optionally generate tick marks along each axis, numeric labels for the tick marks, and movable mesh planes perpendicular to each of the axes. INPUT The input field must be an AVS 2D field, but it may have any data type at each field point. The scalar float input is used as a scaling factor to allow blowing up the mesh along the "z" direction without destroying the label information. OUTPUT The output is a geometry object consisting of lines forming the axes, with optional tick marks, mesh planes, and labels. PARAMETERS normalized uniform field -This toggle sets compatibility for AVS2 type meshes. In this mode, the x and y axes span the range -1 to 1, rather than the number of values in a particular dimension. x axis ticks y axis ticks z axis ticks - These sliders set the number of ticks shown along an axis. tick size - This slider adjusts the size of the ticks marks. xz plane position xy plane position yz plane position - These sliders set the position of the mesh planes. This is a relative positioning along the perpen- dicular axis. Show xz plane Show xy plane Show yz plane - These switches turn the mesh planes on and off. Mesh line spacing is determined by tick spacing, so that if there are no ticks shown, there will be no mesh planes shown regardless of the setting of these switches. font size - This slider sets the relative label font height. label precision - This slider sets the number of digits shown to the right of the decimal in the numeric labels. x label density y label density z label density - These sliders set the frequency of label display, relative to tick marks. That is, if n is a label density setting, a numeric label will be displayed every n ticks along the axis. origin labels - This is a type-in field which is scanned for an x, y, and z. For any of these characters present in the string, the origin numeric label appropriate for the respective axis is displayed. This facility is provided to reduce label confusion at the origin. If all axis minimum (origin) values are the same, that value is shown by default at the origin. Show labels - This switch turns tick labeling on and off. x axis min x axis max y axis min y axis max z axis min z axis max - These type-in fields show, and allow adjustment of, the axis minmum (origin) and maximum (end point) values. If the data set is UNIFORM, adjustment of these fields simply changes the values of any displayed numeric labels. This allows the user to make the labeling better reflect the true dimensions of the data. If the data set is RECTILINEAR or IRREGULAR, adjustment of these fields will change the actual on sreen location of the chosen points, without changing the labels on the unaffected part of the axis. For example, if the initial minimum x co- ordinate is 10, changing it to 0 would move the axis origin 10 units in the negative x direction. This would have the effect of moving the coordinate axis system origin outside of the displayed data set. But the tick labeled 10 would still be in the same place and it would still be labeled 10. (For further discussion refer to DATA MAPPING below.) DATA MAPPING If the input is a UNIFORM data set then there are no coordinate values stored in the data set and the coordinate axes, along with the data, are drawn in normalized space. The axis origin is placed in the far lower left corner of the displayed data set. The initial axis min values are set to zero, and the max values are set to the respective dimensions of the data set. These values, and therefore the tick label values, are independent of the actual drawing on screen. For your additional convenience, a toggle is provided to generate x and y axes which are normalized over the range of -1 to 1. Meshes of this type are especially useful when users use an upstream downsize module to subsample the data set. If the input is a RECTILINEAR or IRREGULAR data set then the axes, along with the data, are drawn in the world space of the data set. In this case, the origin of the axis system is placed at the minimum world value for each data dimension, and ticks are labeled accordingly. (For a RECTILINEAR data set, this is typically the far lower left corner of the displayed data set). Note that this may or may not coincide with the world origin (0,0,0) which is defined by the data set's stored coordinate information. For example, if the minimum values of the data set coordinates for each axis is 10, then the point (0,0,0) would lie outside of the data set. If the axis min or max values are changed, then the drawn axis will change position or length, but labels will remain consistant with the stored data set (world) coordinates. EXAMPLE The following network shows a typical usage of mesh axis: float read field | ______________| |___|___________ | | | | | | | field math mesh axis | | field to mesh2 |______________| | render geometry | display pixmap In this sample network, the field math module float input port is turned on, enabling scaling by multiplication of both the surface mesh and the associated axes. The field to mesh2 module is used because the AVS3 field to mesh module does not work correctly with RECTILINEAR or IRREGULAR data RELATED MODULES 3D axis (Wes Bethel, LBL) read field float field math field to mesh field to mesh2 (Wes Bethel, LBL) prequisite for sample net #1 render geometry AVS Modules mesh axis U.C. Berkeley, College of Chemistry 29 Feb 1992