next up previous contents index
Next: Overview of module plwf Up: PyGist 3D Graphics Previous: PyGist 3D Graphics   Contents   Index


General overview of module pl3d

The Python module pl3d.py contains the basic 3D plotting algorithms and is the workhorse of the PyGist 3D graphics. The philosophy behind 3D plotting is to instruct the 3D plotting functions to accumulate information about the plot until such time as the information is complete, and then ask that the picture be drawn. The information about the plot is stored in a Python list containing the following information:

° The orientation of the axes, the location of the origin, and the distance of the viewpoint; ° A set of pairs of plot functions to call and their argument lists; and ° A collection of one or more quintuples specifying the lighting (it is possible to specify multiple light sources). The first and third items above default to reasonable values if the user does not call functions (e. g., rot3, mov3, aim3, set3_ light., etc.) to set them. The list described in the second bullet is built by a set of one or more calls to the various plotting functions, which create the list of arguments for each call and then add the function name and argument list pair to the plot list for future execution. When the list is complete, a call to draw3 causes the list to be traversed, and at this point each plotting function on the list executes with the argument list that was built when it was first called.


next up previous contents index
Next: Overview of module plwf Up: PyGist 3D Graphics Previous: PyGist 3D Graphics   Contents   Index
Michiel Jan Laurens de Hoon 2003-04-19