## functions in pl3d.i - s

save3

view= save3() Save the current 3D viewing transformation and lighting. Interpreted function, defined at i/pl3d.i line 233SEE ALSO: restore3, rot3, mov3, aim3, light3

set3_object

set3_object, drawing_function, _lst(arg1,arg2,...) set up to trigger a call to draw3, adding a call to the 3D display list of the form: DRAWING_FUNCTION, _lst(ARG1, ARG2, ...) When draw3 calls DRAWING_FUNCTION, the external variable _draw3 will be non-zero, so DRAWING_FUNCTION can be written like this: func drawing_function(arg1,arg2,...) { require, "pl3d.i"; if (_draw3) { list= arg1; arg1= _nxt(list); arg2= _nxt(list); ... ...SEE ALSO: get3_xy, get3_light, sort3d... ... ... return; } ... ... ... ... set3_object, drawing_function, _lst(arg1,arg2,...); } Interpreted function, defined at i/pl3d.i line 630

setz3

setz3, zc Set the camera position to z=ZC (x=y=0) in the viewer's coordinate system. If ZC is nil, set the camera to infinity (default). Interpreted function, defined at i/pl3d.i line 113SEE ALSO: rot3, orient3, undo3, save3, restore3, light3

sort3d

sort3d(z, npolys, &list, &vlist) given Z and NPOLYS, with numberof(Z)==sum(npolys), return LIST and VLIST such that Z(VLIST) and NPOLYS(LIST) are sorted from smallest average Z to largest average Z, where the averages are taken over the clusters of length NPOLYS. Within each cluster (polygon), the cyclic order of Z(VLIST) remains unchanged, but the absolute order may change. This sorting order produces correct or nearly correct order for a plfp command to make a plot involving hidden or partially hidden surfaces in three dimensions. It works best when the polys form a set of disjoint closed, convex surfaces, and when the surface normal changes only very little between neighboring polys. (If the latter condition holds, then even if sort3d mis-orders two neighboring polys, their colors will be very nearly the same, and the mistake won't be noticeable.) A truly correct 3D sorting routine is impossible, since there may be no rendering order which produces correct surface hiding (some polys may need to be split into pieces in order to do that). There are more nearly correct algorithms than this, but they are much slower. Interpreted function, defined at i/pl3d.i line 880SEE ALSO: get3_xy

spin3

spin3 or spin3, nframes or spin3, nframes, axis Spin the current 3D display list about AXIS over NFRAMES. Keywords tlimit= the total time allowed for the movie in seconds (default 60), dtmin= the minimum allowed interframe time in seconds (default 0.0), bracket_time= (as for movie function in movie.i) The default AXIS is [-1,1,0] and the default NFRAMES is 30. Interpreted function, defined at i/pl3d.i line 945SEE ALSO: rot3