Using GVML


GVML Commands

GVML has the following functions available from the Matlab command line:
	geomview( handle, xscale, yscale, zscale )
	writeoogl( handle, file, xscale, yscale, zscale )
The arguments for the functions are:
	handle = handle to graphics object created by a Matlab call.
	file = name of file to save surface object data in OOGL format
	xscale = scaling in x direction (optional, default is 1)
	yscale = scaling in y direction (optional, default is 1)
	zscale = scaling in z direction (optional, default is 1)
The handle variable mobj is returned by each of the following Matlab graphics calls which can be made from the Matlab command line or from a Matlab script:
	mobj = surface(Z);
	mobj = mesh(Z);
	[cmat, mobj] = contour3(X,Y,Z);
	mobj = plot3(X,Y,Z);

The function geomview is used to send a Matlab graphics object to Geomview. For example,

	geomview( mobj, 1, 1.5, 2);
will start up Geomview automatically and send the graphics object defined by mobj to Geomview. The object will be scaled by factors of 1, 1.5, 2 in the x,y,z directions, respectively.

The function writeoogl is used to save a Matlab graphics object in a OOGL format file. For example,

	writeoogl( mobj, '/usr/your_name/work/foo.oogl' );
will save the graphics object defined by mobj to an OOGL format file named /usr/your_name/work/foo.oogl.


GVML Hints

When you use either geomview or writeoogl, the graphics object will first appear in the usual Matlab graphics window before either being sent to Geomview or saved to a file. If the Matlab window appears empty, this means that the graphics object is still being processed by a GVML command.

One current limitation of GVML is that the time it takes to write an OOGL file is directly related to the size of the Matlab data. For example, a large mesh of 300 by 50 elements might take over one minute to write depending on the machine you are using.

When you use the geomview command, a Matlab object appears in the Geomview Target browser. This object is replaced by subsequent calls to the geomview command. Since the object is replaced by each call, you should not delete the object as this will prevent the object from being displayed.


Next:OOGL Formats