libsphere - how do I get a sphere into an object?

Ethan Merritt merritt at milton.u.washington.edu
Fri Nov 2 10:11:00 AEST 1990


I have been playing with libsphere on a PI under 3.3.1.  I like it,
but I haven't been able to figure out how to get spheres into a graphics
object.  The example in 4Dgifts/src/sphere doesn't use objects, so that
hasn't helped.

The simple-minded approach:
		makeobj( sphere_object );
		sphdraw( &params[i] );
		closeobj();
produces nothing when the corresponding callobj( sphere_object ) is done.

The library routine sphobj() looks relevent, but the documentation is,
shall we say, terse.  Calling sphobj( sphereobj ) seems to draw a sphere
into sphereobj all right, but always at the origin (I think).  Anyway
preceding the call with a move( x,y,z ) call seems to have no effect.
I.e.:
	sphobj( sphere_object );
	makeobj( spheres );
	for (i = 0; i < nspheres; i++ )
		{
		move( &xyz[i] );
		callobj( sphere_object );
		}
	closeobj();
	callobj( spheres );
doesn't seem to do anything other than pile up spheres on top of each other.

Can anyone enlighten me?

				thanks,
				            Ethan A Merritt
------------------------------------------------------------------------------
Dept of Biological Structure                H510 Health Sciences
University of Washington SM-20              (206)543-8865
Seattle, WA 98195                           MERRITT at XRAY0.BCHEM.WASHINGTON.EDU
------------------------------------------------------------------------------



More information about the Comp.sys.sgi mailing list