Vis5D API

Last updated: April 15, 1996

Introduction

The Vis5D API (Application Programmer's Interface) is a division between Vis5D's user interface and its main core. This API allows system developers to include Vis5D as a visualization subsystem of other systems, where the other system invokes the Vis5D core through the API. Thus you can have Vis5D functionality combined with a user interface consistent the rest of your system.

All Vis5D API functions start with the prefix vis5d_. All API constants start with the prefix VIS5D_.

All Vis5D API functions are of type integer, returning a non-negative value if successful (all but a few return just 0 if successful), otherwise one of these negative error values:

The first argument to all API functions, except the global functions and vis5d_alloc_context, is an integer context index between 0 and VIS5D_MAX_CONTEXTS-1.

Each context has an independent memory pool.

Physical variable number arguments are always in the range [0,numvars-1] where numvars is the value returned by vis5d_get_numvars(). Similarly, time step arguments are always in the range [0,numvars-1] where numvars is the value returned by vis5d_get_numvars().

There are three coordinate systems used by Vis5D:

Outline

The Vis5D API functions can be catagorized as follows:

Function descriptions

Global Functions

int vis5d_initialize( int cavemode )
This must be the first API function called. It takes one argument which indicates if Vis5D is being used with the CAVE (1=yes, 0=no).
int vis5d_terminate( int close_window )
This function should be called just before your application exits. The close_window argument determines whether or not the associated GL windows are destroyed or not. If non-zero, then the windows will be destroyed.
int vis5d_workers( int nworkers )
Specifies how many background threads should be created. The nworkers argument should be non-negative (if it is 0, all computations are done in foreground). Background threads compute isosurfaces, contour/colored slices, and wind trajectories. Threads take advantage of multiple CPUs when present.
int vis5d_do_work( void )
If the nworkers argument of vis5d_workers() was 0, this function must be called regularly (inside your event loop) to process jobs waiting in the work queue. If the nworkers argument of vis5d_workers() was positive, calling this function is a no-op.
int vis5d_check_work( int *pending )
Checks if there are background jobs waiting in the work queue. A value of 1 will be returned in pending if jobs are pending, or 0 will be returned in pending if the queue is empty.
int vis5d_finish_work( void )
This function blocks and returns when there are no more background jobs pending.
int vis5d_colorbar_init_params( float params[], int rgb_flag, int alpha_flag )
Reset the RGB and/or Alpha curve parameters to their defaults.
int vis5d_colorbar_recompute( unsigned int table[], int size, float params[], int rgb_flag, int alpha_flag )
Recompute the RGB and/or Alpha table entries from their parameters.
int vis5d_colorbar_set_alpha( float params[], float alpha )
Set transparency values to constant value alpha, or to default curve if alpha<0.

Per-Context Functions

A Vis5D context is initialized with the functions in this section. After a context is allocated, the first initialization call must be to vis5d_init_begin() and the last initialization call must be to vis5d_init_end(). In between, you may call any other vis5d_init_* function. You'll usually call a vis5d_init_*_window() function and you MUST also call vis5d_open_gridfile() to specify what v5d file you want to view. For example:

     c = vis5d_alloc_context();
     vis5d_init_begin( c );
     vis5d_init_...
     vis5d_init_window( c, ... );
     vis5d_open_gridfile( c, "LAMPS.v5d", 0 );
     vis5d_init_end( c );
int vis5d_alloc_context( void )
Allocate a new Vis5D context and return its integer index or VIS5D_FAIL if no more contexts can be allocated. This function is not required; contexts are identified by small integers and an applications may simply allocate/manage these small integers itself.
int vis5d_destroy_context( int index, int close_window )
Destroy a vis5d context. If the close_window argument is non-zero then the associated GL window will also be destroyed.
int vis5d_init_begin( int index )
Begin initialization of context number 'index'.
int vis5d_init_end( int index )
This function is to be called after all other initializations functions. At this time, Vis5D will take the information provided by the other init functions and actually construct the context.
int vis5d_open_gridfile( int index, char *name, read_flag )
Specify the file name of the Vis5D dataset to visualize. read_flag indicates whether or not data should immediately be read from the file (1) or if data should be read as needed later (0).

This function is unique among the initialization functions in that it may also be called after vis5d_init_end (any number of times), causing the current dataset to be discarded and replaced by the new one specified.

int vis5d_init_memory( int index, int mbs )
Specify the size of memory (the mbs argument has the number of megabytes) pool to allocate for the context.
int vis5d_init_window( int index, char *title, int x, int y, int width, int height )
Create a 3-D graphics window for the given context. The arguments are the window title string, the window position, and size (in pixels).
int vis5d_init_gl_window( int index, int winid )
Attach a previously created IRIS GL window to a Vis5D context. winid is the IRIS GL window identifier as returned by the GL winopen() function.
int vis5d_init_glx_window( int index, Window window, GLXconfig *ctx )
Attach a "mixed-mode" IRIS GL window to a Vis5D context. The window argument is an X window identifier and ctx is the GL/X context attribute array used to create the window. See the man page for GLXgetconfig() for more info.
int vis5d_init_opengl_window( int index, Window window, GLXContext ctx )
Attach an OpenGL window to a Vis5D context. The window argument is the X window identifier and ctx is the GLX context identifier.
iint vis5d_init_log( int index, float scale, float exponent)
Specify the coefficients relating altitude to presure when using a logrithmic vertical coordinate system.
int vis5d_init_box( int index, float alon, float alat, float ahgt )
Specify the aspect ratio of the 3-D box. The ratio of lengths along the longitude, latitude and height axes is specified by alon:alat:ahgt.
int vis5d_init_path( int index, char *pathname )
Specify the directory to search for topograph (*.TOPO) and map outline (OUTL*) files. The current directory is the default.
int vis5d_init_map( int index, char *mapname )
Specify the file name of the map outline file to use. If this is not called, the system will try to use default US or world map outline files, depending on map extents.
int vis5d_init_topo( int index, char *toponame, int highres_flag )
Specify the file name of the topography file to use and whether it should be displayed in low or high resolution (highres_flag=0 means low resolution, 1 means high resolution). If this is not called, no topography will be used.
int vis5d_init_texture( int index, char *texturename )
Specify the file name of an image to texture map over the topography.
int vis5d_init_firstarea( int index, int area )
Specify the file number of the first of a consecutive sequence of McIDAS area files to texture map over the topography.
int vis5d_init_sequence( int index, char *sequencename )
Specify the name of a raw image sequence file to texture map over the topography.
int vis5d_init_projection( int index, int projection, float *projargs )
Specify a map projection to override the one found in the Vis5D datafile.
int vis5d_init_vertical( int index, int vertical, float *vertargs )
Specify a vertical coordinate system to override the one found in the Vis5D datafile.

Post-Initialization Context Functions

After a Vis5D context has been initialized you may query the v5d file's attributes and control the actual Vis5D visualization operations with these functions.

Time Step Functions

int vis5d_get_numtimes( int index, int *numtimes )
Returns the number of time steps in numtimes.
int vis5d_get_time_stamp( int index, int timestep, int *day, int *time )
Returns the real world time and date associated with a timestep.
int vis5d_set_time_stamp( int index, int timestep, int day, int time )
Set the real world time and date to associate with a timestep.
int vis5d_set_timestep( int index, int step_number )
Set the current timestep. step_number is an integer in [0,numtimes-1].
int vis5d_get_timestep( int index, int *step_number )
Return the current timestep number in step_number, which will be in [0,numtimes-1].

Physical Variable Functions

int vis5d_get_numvars( int index, int *numvars )
Returns the number of physical variables in numvars.
int vis5d_find_var( int index, char *name )
Return the number of the variable indicated by name. This is a convenience function which could otherwise be done with vis5d_get_numvars(), vis5d_get_var_name(), and strcmp().
int vis5d_get_var_name( int index, int var, char *name )
Returns the name of a variable.
int vis5d_get_var_name( int index, int var, char *name )
Returns the name of a variable.
int vis5d_get_var_units( int index, int var, int *type )
Returns the physical units of variable number var. For example, the units for "U" are usually "m/s" (meters per second).
vis5d_get_var_info( int index, int var, void *info )
Return extra information about variable number var.
int vis5d_get_var_range( int index, int var, float *min, float *max )
Returns the minimum and maximum values of the specified variable.
int vis5d_set_wind_vars( int index, int u1, int v1, int w1, int u2, int v2, int w2, int utraj, int vtraj, wtraj )
Specify the variables to use for the U, V, W components of wind slices and trajectories.
int vis5d_get_wind_vars( int index, int *u1, int *v1, int *w1, int *u2, int *v2, int *w2, int *utraj, int *vtraj, *wtraj )
Return the number of the variables which correspond to the U, V, and W components of wind vectors.

3-D Grid Functions

int vis5d_get_size( int index, int *nr, int *nc, int nl[], int *maxnl, int *maxnlvar, int *windnl, int *windlow )
Returns information about the size of the 3-D grids: Note that these arguments are pointers. NULL pointers are legal (useful for when you don't care to get all the attributes.)
int vis5d_get_grid( int index, int time, int var, float *grid )
Get a 3-D grid.
int vis5d_put_grid( int index, int time, int var, float *grid )
Write a 3-D grid.
int vis5d_get_grid_value( int index, int var, float row, float column, float level, float *value )
Get a single grid value at current time step. If the row, column and level parameters are not integers then the grid value will be computed as a weighted average of the 8 nearest neighbors.
int vis5d_verylarge_mode( int index, int mode )
The "VeryLarge" option is useful for visualizing files which are much larger than your system's RAM would normally accomodate. When VeryLarge mode is enabled, graphics are only computed when needed (i.e. whenever the current timestep is changed) and not automatically computed for all timesteps.

Map Projection and Vertical Coordinate System Functions:

int vis5d_get_projection( int index, int *projection, float projargs[] )
Return the parameters which describe the current map projection.
int vis5d_get_vertical( int index, int *vertical, float vertargs[] )
Return the parameters which describe the current vertical coordinate system.
int vis5d_get_curved( int index, int *curved )
Return whether or not the 3-D box will really be a box (curved=0) or the box is actually a curved shape (curved=1).

Topography, Map and Texture Functions

int vis5d_check_topo( int index, int *topoflag )
Return a flag indicating whether or not there is a topography to display.
int vis5d_check_map( int index, int *mapflag )
Return a flag indicating whether or not there is a map to display.
int vis5d_check_texture( int index, int *textureflag )
Return a flag indicating whether or not there are texture map(s) (images mapped onto the topography) to display.
int vis5d_get_topo_range( int index, float *min, float *max )
Returns the minimum and maximum topography heights (in KM) in the domain.
int vis5d_recolor_topo( int index, int reset )
Recolor the topography according to the topography color table. If reset is non-zero, then the colortable will be reset to its initial, default values.
int vis5d_texture_image( int index, int timestep, int width, int height, int components, void *image )
Define a texture map to render over the topograpy. A different image can be specified for each timestep.

Clones, External Functions, and Expression Functions

int vis5d_make_clone_variable( int index, int var_to_clone, char *newname, int *newvar )
Clone a physical variable. VIS5D_FAIL will be returned if newname is already in use.
int vis5d_compute_ext_func( int index, char *funcname, int *newvar )
Call a user-written, external Fortran function to compute a new variable. If the function has been called before, the results of executing the function will replace the values of the previous computation and no new variable will be created.
int vis5d_compute_expression( int index, char *expression, char *newname, int *newvar, int *recompute, char *mess)
Compute a new variable from an expression in terms of existing variables. If the target variable of the function already exists, the results of evaluating the expression will replace the values of the previous computation and no new variable will be created.

Rendering Functions

int vis5d_signal_redraw( int index, int count )
Sets the redraw flag to count. When the API user wants the 3-D image redrawn this function should be called. Vis5D core functions may also set this flag.
int vis5d_check_redraw( int index, int *redraw )
Check if a redraw is pending. This returns the value set by vis5d_signal_redraw(). If it's non-zero the user program should call vis5d_draw_frame soon.
int vis5d_draw_frame( int index, int animflag )
Redraw the 3-D image. Then clear the redraw flag. Note that the new image will not be displayed until vis5d_swap_frame is called.
int vis5d_draw_3d_only( int index, int animflag )
Draw only the 3-D elements of a Vis5D scene. No graphics library operations such as window clearing or matrix transformations are done.
int vis5d_draw_2d_only( int index )
Draw only the 2-D elements of a Vis5D scene. No graphics library operations such as window clearing or matrix transformations are done.
int vis5d_swap_frame( int index, int animflag )
Display the most recently drawn frame. This call usually follows vis5d_draw_frame.
int vis5d_invalidate_frames( int index )
Tells Vis5D to invalidate and discard any cached 3-D images.
int vis5d_set_pointer( int index, int x, int y )
Draw an arrow pointer in the 3-D graphics window at position (x,y) where (0,0) is the upper-left corner of the window. If (x,y) equals (-1,-1), the default, then no pointer will be drawn. This function is useful when the 3-D graphics window is on a different display than the GUI.
int vis5d_graphics_mode( int index, int type, int mode )
Specify miscellaneous graphics state.
Note, the return value is the current mode, not a VIS5D_ error value.
int vis5d_enable_graphics( int index, int type, int number, int mode )
Specify which graphical elements are to be displayed.
Return 1 if graphic is finally displayed or 0 if not displayed.
int vis5d_check_volume( int index, int *volflag )
Determine if 3-D volume rendering is available.
int vis5d_set_volume( int index, int current_volume )
current_volume specifies which volume to display or -1 which indicates no volume is to be displayed.
int vis5d_get_volume( int index, int *current_volume )
current_volume returns the number of the variable which is currently being displayed as a volume or -1 if no volume is being displayed.
int vis5d_set_color( int index, int type, int number, float red, float green, float blue, float alpha )
Set the color of a Vis5D graphic such as an isosurface, slice or trajectory.
int vis5d_get_color( int index, int type, int number, float *red, float *green, float *blue, float *alpha )
Returns the color of a Vis5D graphic such as an isosurface, slice or trajectory.
int vis5d_get_color_table_address( int index, int type, int number, unsigned int **colors )
Returns the address of a color lookup table for an isosurface, colored slice, volume, or the topography.
int vis5d_get_colorbar_params( int index, int type, int number, unsigned int **params )
Returns the address of parameters for color lookup table for an isosurface, colored slice, volume, trajectories or the topography.
int vis5d_set_colorbar_params( int index, int type, int number, unsigned int params[] )
Sets the values of parameters for color lookup table for an isosurface, colored slice, volume, trajectories or the topography.
int vis5d_set_cursor_color( int index, int traj_set )
The color of the 3-D cursor is always the same as one of the trajectory sets. This function is used to specify which trajectory set the cursor color should track.
int vis5d_alpha_mode( int index, int mode )
Specify how semi-transparent surfaces are to be rendered. If mode equals zero then use the "screendoor" technique, otherwise use alpha blending.
int vis5d_font( int index, char *fontname, int size)
Specify the font to use in the graphics window. The fontname is either an X font or an IRIS GL Font Manager font name depending on what graphics library is being used. The size argument is only used in the later case.
int vis5d_linewidth( int index, int width )
Specify the width, in pixels, of line segments.
int vis5d_gl_setup( int index, long win_id, int width, int height )
Prepare the context for a subsequent rendering by providing information about the window in which to render. (This allows an application to render a context into several co-existing windows, for example.)
int vis5d_get_box_bounds( int index, float *xmin, float *xmax, float *ymin, float *ymax, float *zmin, float *zmax )
Returns the extents of the 3-D box in graphics coordinates.

3-D View Functions

int vis5d_set_matrix( int index, float ctm[4][4] )
Set the current 3-D transformation matrix.
int vis5d_get_matrix( int index, float ctm[4][4] )
Returns the current 3-D transformation matrix.
int vis5d_set_ortho_view( int index, int view )
Set the current 3-D transformation matrix to view from a north, south, east, west, top, or bottom vantage point.
int vis5d_set_view( int index, float xrot, float yrot, float zrot, float scale, float xtrans, float ytrans, float ztrans )
Set the current 3-D transformation matrix with rotation, scale, and translation values.
int vis5d_set_camera( int index, int perspective, float frontclip, float zoom)
Setup the parameters of the imaginary camera.
int vis5d_get_camera( int index, int perspective, float frontclip, float zoom)
Returns the parameters of the imaginary camera.

Make and Control Isosurface, Slices, Trajectories, etc.

int vis5d_make_isosurface( int index, int var, int time )
Compute a time sequence of isosurfaces using the current isolevel.
int vis5d_set_isosurface( int index, int var, float isolevel )
Set the current isolevel for a variable. The isolevel controls isosurface generation.
int vis5d_get_isosurface( int index, int var, float *isolevel )
Returns the current isolevel for a variable.
int vis5d_set_isosurface_color_var( int index, int iso_var, int colorvar )
Specifies which variable is to be used to color and isosurface. A colored isosurface is one which, instead of being mono-color, is colored per-vertex by another variable according to a colormap.
int vis5d_get_isosurface_color_var( int index, int iso_var, int *colorvar )
Returns the number of the variable used to color an isosurface.
int vis5d_make_hslice( int index, int var, int time )
Compute a time sequence of horizontal contour line slice at the current slice position.
int vis5d_set_hslice( int index, int var, float interval, float low, float high, float level )
Set the current position and parameters of a horizontal contour line slice.
int vis5d_get_hslice( int index, int var, float *interval, float *low, float float *level )
Returns the current position and parameters of a horizontal contour line slice.
int vis5d_make_vslice( int index, int var, int time )
Compute a time sequence of vertical contour line slice at the current slice position.
int vis5d_set_vslice( int index, int var, float interval, float low, float high, float row0, float col0, float row1, float col1)
Set current position and parameters of a vertical contour line slice. interval - isoline spacing
int vis5d_get_vslice( int index, int var, float *interval, float *low, float high, float *row0, float *col0, float *row1, float *col1 )
Returns current position and parameters of a vertical contour line slice.
int vis5d_make_chslice( int index, int var, int time )
Compute a time sequence of horizontal color slice at the current slice position.
int vis5d_set_chslice( int index, int var, float level )
Set the current position of a horizontal color slice.
int vis5d_get_chslice( int index, int var, float *level )
Returns the current position of a horizontal color slice.
int vis5d_make_cvslice( int index, int var, int time )
Compute a time sequence of vertical colored slices at the current slice position.
int vis5d_set_cvslice( int index, int var, float row0, float col0, float row1, float col1 )
Set the current position for a vertical colored slice.
int vis5d_get_cvslice( int index, int var, float *row0, float *col0, float row1, float *col1 )
Returns the current position for a vertical colored slice.
int vis5d_make_hwindslice( int index, int slice, int time )
Compute a time sequence of horizontal wind vector slices at the current slice position.
int vis5d_set_hwindslice( int index, int slice, float density, float scale, float level )
Set the current position of a horizontal wind vector slice.
int vis5d_get_hwindslice( int index, int slice, float *density, float *scale, float *level )
Returns current position and parameters of a horizontal wind vector slice:
int vis5d_make_vwindslice( int index, int slice, int time )
Compute a time sequence of vertical wind vector slices at the current slice position.
int vis5d_set_vwindslice( int index, int slice, float density, float scale, float row0, float col0, float row1, float col1 )
Set the current position and parameters for a vertical wind vector slice.
int vis5d_get_vwindslice( int index, int slice ,float *density, float *scale, float *row0, float *col0, float *row1, float *col1 )
Get the current position and parameters for a vertical wind vector slice.
int vis5d_make_streamslice( int index, int slice, int time )
Compute a time sequence of horizontal streamline slices at the current slice position.
int vis5d_set_streamslice( int index, int slice, float density, float level )
Set the current position of a horizontal streamline slice.
int vis5d_get_streamslice( int index, int slice, float *density, float *level )
Returns current position and parameters of a horizontal streamline slice:
int vis5d_make_traj( int index, float row, float col, float lev, int time, int set )
Compute a wind trajectory. Strictly speaking, a request for a trajectory is put into the work queue.
int vis5d_set_traj( int index, float step, float length, int ribbon_flag )
Set trajectory computation parameters:
int vis5d_get_traj( int index, float *step, float *length, int *ribbon_flag )
Get trajectory computation parameters:
int vis5d_set_trajectory_color_var( int index, int traj_set, int colorvar )
Specifies which variable is to be used to color trajectories. A colored trajectory is, instead of being mono-colored, colored per-vertex by another variable according to a colormap. Current trajectories belonging to the set will be recolored.
int vis5d_get_trajectory_color_var( int index, int traj_set, int *colorvar )
Returns the number of the variable used to color a trajectory set.
int vis5d_delete_last_traj( int index )
Delete the last trajectory made.
int vis5d_delete_traj_set( int index, int set )
Delete a set of trajectories.
vis5d_init_graphics_pos( int index, int var )
Reset the position and parameters of all graphics which correspond to the given variable.
int vis5d_make_timestep_graphics( int index, int time )
Recompute all displayed graphics (except trajectories) for a time step
int vis5d_free_graphics( int index )
Delete all graphics from memory. This can be useful when memory is nearly exhausted or very fragmented.

Text Labels

int vis5d_make_label( int index, int x, int y, char *text )
Make a complete text label at window coordinate (x,y). This function is used for creating text labels non-interactivly.
int vis5d_new_label( int index, int x, int y, int *label_id )
Start making a new text label at window coordinate (x,y). The label_id will return a unique identifier for this label as accepted by the functions below. This function is used for interactivly creating a text label. This label is now considered the current label for editing, etc.
int vis5d_edit_label( int index, char chr )
Append chr onto the current text label (see vis5d_new_label). If chr is a backspace or delete character, the last character in the label will be deleted.
int vis5d_find_label( int index, int x, int y, int *label_id )
Determine which text label is nearest to window coordinate (x,y) and return its unique identification number in label_id.
int vis5d_move_label( int index, int label_id, int x, int y )
Move the text label identified by label_id to the new window position (x,y).
int vis5d_delete_label( int index, int label_id )
Delete the text label identified by label_id.

3-D Cursor Functions:

int vis5d_set_cursor( int index, float x, float y, float z )
Set the cursor position. (x,y,z) is in graphics space.
int vis5d_get_cursor( int index, float *x, float *y, float *z )
Returns the cursor's position as (x,y,z) in graphics space.

3-D Viewing Window Functions

int vis5d_get_window( int index, Window *window, int *width, int *height )
Return the X window ID of the context's graphics window. Also return the window size in pixels.
int vis5d_resize_window( int index, int width, int height )
Call this function when the size of the 3-D window changes.
int vis5d_get_image_formats( int *formats )
Returns a bitmask indicating which image file formats are supported by the vis5d_save_window function. Formats supported may be the bitwise-OR of zero or more of: VIS5D_XWD, VIS5D_GIF, VIS5D_RGB, VIS5D_POSTSCRIPT, or VIS5D_COLOR_POSTSCRIPT
int vis5d_save_window( int index, char *filename, int format )
Save the current 3-D image as an image file.
int vis5d_print_window( int index )
Send the 3-D window image to the default printer. The printer must support PostScript.

Coordinate Conversion

int vis5d_project( int index, float p[3], float *winx, float *winy )
Project a point in 3-D graphics coordinates to 2-D window coordinates.
int vis5d_unproject( int index, float winx, float winy, float point[3], float dir[3] )
"Unproject" a point from 2-D window coordinates to a parametric line in graphics space.
int vis5d_xyz_to_grid( int index, int time, int var, float x, float y, float z, float *row, float *column, float *level )
Convert a coordinate from graphics space to grid space. The timestep and variable are needed in case of a projection which is dependent on timestep and/or variable.
int vis5d_grid_to_xyz( int index, int time, int var, float row, float column, float level, float *x, float *y, float *z )
Convert a coordinate from grid space to graphics space. The timestep and variable are needed in case of a projection which is dependent on timestep and/or variable.
int vis5d_xyz_to_geo( int index, int time, int var, float x, float y, float z, float *lat, float *lon, float *hgt )
Convert a coordinate from graphics space to geographic space. The timestep and variable are needed in case of a projection which is dependent on timestep and/or variable.
int vis5d_geo_to_xyz( int index, int time, int var, float lat, float lon, float hgt, float *x, float *y, float *z )
Convert a coordinate from graphics space to geographic space. The timestep and variable are needed in case of a projection which is dependent on timestep and/or variable.

Recently removed functions

int vis5d_init_trajvars( int index, char *uname, char *vname, char *wname )
Functionality replaced by vis5d_set_wind_vars().
int vis5d_init_wind2( int index, char *u2name, char *v2name, char *w2name )
Functionality replaced by vis5d_set_wind_vars().
int vis5d_get_graphics_color_address( int index, int type, int number, unsigned int **color)
Replaced by the simpler vis5d_set_color() and vis5d_get_color() functions.
vis5d_get_expression( int index, int var, char *expression )
Replaced by vis5d_get_var_info() function.
int vis5d_set_frontclip( int index, float position )
Replaced by vis5d_set_camera().
int vis5d_set/get_zoom()
Replaced by vis5d_set/get_camera().

Save and Restore

int vis5d_save( int index, int gfx, int traj )
Replaced by tcl_save().
int vis5d_restore( int index, char *filename )
Replaced by execute_script().

Other links: Vis5D, API document, Scripting document, Bill Hibbard, Brian Paul.