Tangent curve generation is central to all of the options provided for visualizing field information within the basic streamline motif. Stream ribbons and stream tubes and combinations of the two are provided to visualize the local streamwise vorticity and crossflow divergence of a vector field along the tangent curve. For the special case of tensor fields, the principal vectors orthogonal to the tangent direction may be used to develop a stream box or stream ellipse.
The Trace and Stream modules may be requested to perform a data interpolation function while generating a tangent curve. For example, the Stream module can interpolate a scalar field along a calculated streamline. Any tangent curve module which has been put into the data interpolation mode invokes "data" drawing functions rather than the graphics attribute and primitive drawing functions. This allows tangent curves to be used to sample other field variables to produce displays such as streamlines colored with density or temperature. In data interpolation mode, the value of the integration parameter (eg. time) is always passed as an additional row in the interpolated data vector. Data interpolation is activated in any tangent curve module by setting a DataInt object as an attribute object.
*vis_TraceBegin - create an instance of a Trace object vis_TraceEnd - destroy an instance of a Trace object vis_TraceError - return Trace object error flag
vis_TraceComputeCoord - coordinates on curvilinear surface vis_TraceConvertCoord - natural coordinates on curvilinear surface vis_TraceCurv - compute streamlines on a curvilinear surface vis_TraceGetConvert - get coordinate conversion error flag vis_TraceGetExit - get final state conditions vis_TraceSetContinuous - set continuous line mode vis_TraceSetEdgeFlag - set wall edges vis_TraceSetEnter - set initial conditions vis_TraceSetObject - set pointers to attribute objects. vis_TraceSetParam - set parameters for streamline integration. vis_TraceSetTopology - set input cell topology
*vis_TraceBegin - create an instance of an Trace object
vis_Trace *vis_TraceBegin ()
None
Destroy an instance of a Trace object using
void vis_TraceEnd (vis_Trace *trace)
Return the current value of a Trace object error flag using
Vint vis_TraceError (vis_Trace *trace)
vis_TraceComputeCoord - compute physical from natural coordinates
void vis_TraceComputeCoord (vis_Trace *trace, Vfloat x[][3], Vfloat r[2], Vfloat xcoord[3])
trace Pointer to Trace object. x Array of point locations defining domain r Natural coordinates
xcoord Physical coordinates
vis_TraceConvertCoord - compute natural from physical coordinates
void vis_TraceConvertCoord (vis_Trace *trace, Vfloat x[][3], Vfloat xcoord[3], Vfloat r[2])
trace Pointer to Trace object. x Array of point locations defining domain xcoord Physical coordinates
r Natural coordinates
The calculation of natural coordinates from physical coordinates is the inverse operation performed by vis_TraceComputeCoord and is much more computationally intensive than the calculation of physical coordinates from natural coordinates. Note that this operation may fail for highly distorted or inverted elements. Use the function vis_TraceGetConvert to get the conversion error flag.
vis_TraceCurv - compute streamline on a curvilinear surface
void vis_TraceCurv (vis_Trace *trace, Vint rank, Vfloat s[], Vfloat x[][3])
trace Pointer to Trace object. rank Type of field data, either vector or tensor =VIS_VECTOR Vector field =VIS_TENSOR Tensor field s Array of vector or tensor field values x Array of point locations defining domain
None
vis_TraceGetConvert - get coordinate conversion error flag
void vis_TraceGetConvert (vis_Trace *trace, Vint *convertflag)
trace Pointer to Trace object.
convertflag Current vis_TraceConvertCoord function error flag. =VIS_OFF No conversion error =VIS_ON Conversion error
vis_TraceGetExit - get terminal state of streamline integration
void vis_TraceGetExit (vis_Trace *trace, Vint iop, Vint *status, Vint *edgenumber, Vfloat xr[3], Vfloat v[3], Vfloat w[3], Vfloat *t)
trace Pointer to Trace object. iop World coordinate flag =0 Natural coordinates =1 World coordinates
status Integration termination status =VIS_STREAMZERO Vector field zero internal to cell =VIS_STREAMCOMPUTE Inverted or degenerate cell =VIS_STREAMEXIT Streamline exited cell at edge =VIS_STREAMBRANCH Streamline branched internal to cell =VIS_STREAMMAXSTEPS Streamline required more than fixed maximum number of time steps. =VIS_STREAMMAXEXCEEDED Streamline exceeded max time or cells edgenumber Edge number of cell through which streamline exited. If the streamline terminated internal to the cell then the edge number is set to zero. xr Termination position of stream in world or natural coordinates v, w Termination orientation vectors t Termination time
A termination status of VIS_STREAMBRANCH can only occur as a result of streamline generation in a tensor field. A termination status of VIS_STREAMMAXEXCEEDED indicates that either the TRACE_MAXCELL parameter set using vis_TraceSetParami or the TRACE_MAXTIME parameter set using vis_TraceSetParamf have been exceeded.
vis_TraceSetContinuous - set continuous line mode
void vis_TraceSetContinuous (vis_Trace *trace, Vint flag)
trace Pointer to Trace object. flag Flag for beginning of new continuous line =VIS_ON Starts continuous line mode =VIS_OFF Terminates continuous line mode
None
None
vis_TraceSetEdgeFlag - set wall edges
void vis_TraceSetEdgeFlag (vis_Trace *trace, Vint flag)
trace Pointer to Trace object. flag Element edge bit flags to indicate wall edges.
None
vis_TraceSetEnter - set initial conditions for streamline integration
void vis_TraceSetEnter (vis_Trace *trace, Vint iop, Vfloat xr[3], Vfloat v[3], Vfloat w[3], Vfloat t)
trace Pointer to Trace object. iop World coordinate flag =0 Natural coordinates =1 World coordinates xr Initial position of stream in world or natural coordinates v, w Initial orientation vectors t Initial time
None
vis_TraceSetObject - set pointers to attribute objects
void vis_TraceSetObject (tvis_Trace *trace, Vint objecttype, Vobject *object)
trace Pointer to Trace object. objecttype The name of the object type to be set. =VIS_COLORMAP ColorMap object =VIS_DATAINT DataInt object =VGL_DRAWFUN DrawFun object =VIS_LEVELS Levels object =VIS_TRANSMAP TransMap object =VIS_VISCONTEXT VisContext object object Pointer to the object to be set.
None
vis_TraceSetParam - set parameters for streamline integration
void vis_TraceSetParamf (vis_Trace *trace, Vint ptype, Vfloat fparam) void vis_TraceSetParami (vis_Trace *trace, Vint ptype, Vint iparam)
trace Pointer to Trace object. ptype Parameter type to set. =TRACE_MAXCELL Maximum number of cells =TRACE_MAXTIME Maximum time =TRACE_ZEROMAG Zero velocity magnitude fparam Specifies the float value that ptype will be set to. iparam Specifies the integer value that ptype will be set to.
none
The parameter TRACE_MAXCELL is the maximum number of cells which a streamline traverses in a single call to vis_TraceCurv. Setting TRACE_MAXCELL to zero turns off the use of maximum cells to terminate streamline integration. If this parameter is exceeded, the exit status returned by vis_TraceGetExit is set to VIS_STREAMMAXEXCEEDED. By default TRACE_MAXCELL is set to TRACE_MAXSTEPS (2048)
The parameter TRACE_MAXTIME is the maximum time which a streamline can reach. This parameter is set using vis_TraceSetEnter and returned using vis_TraceGetExit. Setting TRACE_MAXTIME to zero turns off the use of time to terminate streamline integration. If this parameter is exceeded, the exit status returned by vis_TraceGetExit is set to VIS_STREAMMAXEXCEEDED. By default TRACE_MAXTIME is 0.
The parameter TRACE_ZEROMAG is a velocity magnitude tolerance. If the streamline reaches a point in with the velocity magnitude falls below this value the streamline is terminated. If this parameter is exceeded, the exit status returned by vis_TraceGetExit is set to VIS_STREAMZERO. By default TRACE_ZEROMAG is approximately the minimum representable single precision float value.
vis_TraceSetTopology - set cell topology
void vis_TraceSetTopology (vis_Trace *trace, Vint shape, Vint maxi, Vint maxj)
trace Pointer to Trace object. shape Cell shape parameter =VIS_SHAPETRI Triangle =VIS_SHAPEQUAD Quadrilateral =VIS_SHAPEPOLYGON Polygon maxi Topology parameters maxj
None
*vis_StreamBegin - create an instance of a Stream object vis_StreamEnd - destroy an instance of a Stream object vis_StreamError - return Stream object error flag
vis_StreamComputeCoord - coordinates on curvilinear surface vis_StreamConvertCoord - natural coordinates on curvilinear surface vis_StreamCurv - compute streamlines in curvilinear volume vis_StreamGetConvert - get coordinate conversion error flag vis_StreamGetExit - get final state conditions vis_StreamSetContinuous - set continuous line mode vis_StreamSetElemNode - set input polyhedral cell connectivity vis_StreamSetEnter - set initial conditions vis_StreamSetFaceFlag - set wall faces vis_StreamSetObject - set pointers to attribute objects. vis_StreamSetParam - set parameters for streamline integration. vis_StreamSetTopology - set input cell topology
A streamline is computed using vis_StreamCurv. The streamline computation terminates if the streamline exits a face of the element or cell array, encounters a zero length vector or branches (tensor fields only) at a point internal to the element or cell array. Use vis_StreamGetExit to return information about the termination status of a streamline. In particular the face number through which the streamline exited can be used to indicate an adjacent element in which the streamline may continue to be propagated.
If a streamline is to be continued in an adjacent element or cell array, use vis_StreamComputeCoord to compute the physical coordinates of the exit point of the streamline from the natural coordinates provided by vis_StreamGetExit. Use the exit face number to point to the element or cell array into which the streamline is propagating. Call vis_StreamConvertCoord to calculate the natural coordinates of the entrance position of the streamline in the new element or cell array. Set the initial conditions for streamline generation with vis_StreamSetEnter and continue the generation of the streamline in the new element or cell array with vis_StreamCurv. Note that the function call vis_StreamConvertCoord may be unable to compute natural coordinates due to severe element distortion or element inversions and does not call the error handler. Use the function vis_StreamGetConvert to get the conversion error status.
*vis_StreamBegin - create an instance of a Stream object
vis_Stream *vis_StreamBegin ()
None
Destroy an instance of a Stream object using
void vis_StreamEnd (vis_Stream *stream)
Return the current value of a Stream object error flag using
Vint vis_StreamError (vis_Stream *stream)
vis_StreamComputeCoord - compute physical from natural coordinates
void vis_StreamComputeCoord (vis_Stream *stream, Vfloat x[][3], Vfloat r[3], Vfloat xcoord[3])
stream Pointer to Stream object. x Array of point locations defining domain r Natural coordinates
xcoord Physical coordinates
vis_StreamConvertCoord - compute natural from physical coordinates
void vis_StreamConvertCoord (vis_Stream *stream, Vfloat x[][3], Vfloat xcoord[3], Vfloat r[3])
stream Pointer to Stream object. x Array of point locations defining domain xcoord Physical coordinates
r Natural coordinates
The calculation of natural coordinates from physical coordinates is the inverse operation performed by vis_StreamComputeCoord and is much more computationally intensive than the calculation of physical coordinates from natural coordinates. Note that this operation may fail for highly distorted or inverted elements. Use the function vis_StreamGetConvert to get the conversion error flag.
vis_StreamCurv - compute streamline in curvilinear volume
void vis_StreamCurv (vis_Stream *stream, Vint rank, Vfloat s[], Vfloat x[][3])
stream Pointer to Stream object. rank Type of field data, either vector or tensor =VIS_VECTOR Vector field =VIS_TENSOR Tensor field s Array of vector or tensor field values x Array of point locations defining domain
None
vis_StreamGetConvert - get coordinate conversion error flag
void vis_StreamGetConvert (vis_Stream *stream, Vint *convertflag)
stream Pointer to Stream object.
convertflag Current vis_StreamConvertCoord function error flag. =VIS_OFF No conversion error =VIS_ON Conversion error
vis_StreamGetExit - get terminal state of streamline integration
void vis_StreamGetExit (vis_Stream *stream, Vint iop, Vint *status, Vint *facenumber, Vfloat xr[3], Vfloat v[3], Vfloat w[3], Vfloat *t)
stream Pointer to Stream object. iop World coordinate flag =0 Natural coordinates =1 World coordinates
status Integration termination status =VIS_STREAMZERO Vector field zero internal to cell =VIS_STREAMCOMPUTE Inverted or degenerate cell =VIS_STREAMEXIT Streamline exited cell at face =VIS_STREAMBRANCH Streamline branched internal to cell =VIS_STREAMMAXSTEPS Streamline required more than fixed maximum number of time steps. =VIS_STREAMMAXEXCEEDED Streamline exceeded max time or cells facenumber Face number of cell through which streamline exited. If the streamline terminated internal to the cell then the face number is set to zero. xr Termination position of stream in world or natural coordinates v, w Termination orientation vectors t Termination time
A termination status of VIS_STREAMBRANCH can only occur as a result of streamline generation in a tensor field. A termination status of VIS_STREAMMAXEXCEEDED indicates that either the STREAM_MAXCELL parameter set using vis_StreamSetParami or the STREAM_MAXTIME parameter set using vis_StreamSetParamf have been exceeded.
vis_StreamSetContinuous - set continuous line mode
void vis_StreamSetContinuous (vis_Stream *stream, Vint flag)
stream Pointer to Stream object. flag Flag for beginning of new continuous line =VIS_ON Starts continuous line mode =VIS_OFF Terminates continuous line mode
None
None
vis_StreamSetElemNode - set input polyhedral cell connectivity
void vis_StreamSetElemNode (vis_Stream *stream, Vint ix[])
stream Pointer to Stream object. ix Element connectivity
None
vis_StreamSetEnter - set initial conditions for streamline integration
void vis_StreamSetEnter (vis_Stream *stream, Vint iop, Vfloat xr[3], Vfloat v[3], Vfloat w[3], Vfloat t)
stream Pointer to Stream object. iop World coordinate flag =0 Natural coordinates =1 World coordinates xr Initial position of stream in world or natural coordinates v, w Initial orientation vectors t Initial time
None
To start a streamline, input orientation vectors which are orthogonal to the velocity vector. The orientation vectors should themselves be orthogonal. For stream type VIS_STREAMRIBBON, v is the ribbon direction and width, w need only be orthogonal to v. It is used only to generate Gouraud shaded ribbons if requested. For stream types VIS_STREAMTUBE and VIS_STREAMTWIST, v and w indicate the initial radii of the stream tube. Generally v and w are of equal magnitude in this case, however they do not have to be. For VIS_STREAMTWIST, the direction of v also defines the orientation of the twist stream line on the stream tube. The function vis_StreamComputeCoord can be used to compute the velocity at a point by substituting velocity vectors for the coordinate vectors.
To continue a stream line, use the orientation vectors output by vis_StreamGetExit as input to this function.
vis_StreamSetFaceFlag - set wall faces
void vis_StreamSetFaceFlag (vis_Stream *stream, Vint flag)
stream Pointer to Stream object. flag Element face bit flags to indicate wall faces.
None
vis_StreamSetObject - set pointers to attribute objects
void vis_StreamSetObject (vis_Stream *stream, Vint objecttype, Vobject *object)
stream Pointer to Stream object. objecttype The name of the object type to be set. =VIS_DATAINT DataInt object =VGL_DRAWFUN DrawFun object =VIS_LEVELS Levels object =VIS_VISCONTEXT VisContext object =VIS_COLORMAP ColorMap object =VIS_TRANSMAP TransMap object object Pointer to the object to be set.
None
vis_StreamSetParam - set parameters for streamline integration
void vis_StreamSetParamf (vis_Stream *stream, Vint ptype, Vfloat fparam) void vis_StreamSetParami (vis_Stream *stream, Vint ptype, Vint iparam)
stream Pointer to Stream object. ptype Parameter type to set. =STREAM_MAXCELL Maximum number of cells =STREAM_MAXTIME Maximum time =STREAM_ZEROMAG Zero velocity magnitude =STREAM_USERELEMNODE Enable using polyhedral connectivity fparam Specifies the float value that ptype will be set to. iparam Specifies the integer value that ptype will be set to.
none
The parameter STREAM_MAXCELL is the maximum number of cells which a streamline traverses in a single call to vis_StreamCurv. Setting STREAM_MAXCELL to zero turns off the use of maximum cells to terminate streamline integration. If this parameter is exceeded, the exit status returned by vis_StreamGetExit is set to VIS_STREAMMAXEXCEEDED. By default STREAM_MAXCELL is set to STREAM_MAXSTEPS (2048)
The parameter STREAM_MAXTIME is the maximum time which a streamline can reach. This parameter is set using vis_StreamSetEnter and returned using vis_StreamGetExit. Setting STREAM_MAXTIME to zero turns off the use of time to terminate streamline integration. If this parameter is exceeded, the exit status returned by vis_StreamGetExit is set to VIS_STREAMMAXEXCEEDED. By default STREAM_MAXTIME is 0.
The parameter STREAM_ZEROMAG is a velocity magnitude tolerance. If the streamline reaches a point in with the velocity magnitude falls below this value the streamline is terminated. If this parameter is exceeded, the exit status returned by vis_StreamGetExit is set to VIS_STREAMZERO. By default STREAM_ZEROMAG is approximately the minimum representable single precision float value.
The parameter STREAM_USERELEMNODE is used to enable the use of the user specified polyhedral connectivity using vis_StreamSetElemNode. By default, STREAM_USERELEMNODE is off.
vis_StreamSetTopology - set cell topology
void vis_StreamSetTopology (vis_Stream *stream, Vint shape, Vint maxi, Vint maxj, Vint maxk)
stream Pointer to Stream object. shape Cell shape parameter =VIS_SHAPETET Tetrahedron =VIS_SHAPEPYR Pyramid =VIS_SHAPEWED Wedge =VIS_SHAPEHEX Hexahedron =VIS_SHAPEPOLYHED Polyhedron maxi Topology parameters maxj maxk
None