= 3d object arithmetic / integration with tachyon = Pre-SAGE Days talk [[attachment:Sage3D.pdf]] For the brave: * Preliminary patch [[attachment:graphics3d-0.1.hg]] * Java source and binaries [link:http://sage.math.washington.edu/home/robertwb/3d] A preliminary class-oriented brainstorm: * class Graphics3D * Each instance of this class can be thought of as a scene consisting of objects and textures. * show and save functions * argument to allow user to specify which of the following to use to render the scene * (renderers) Tachyon, x3d, matplotlib, soya, povray, and vrml * not every primitive will render in every one of (renderers), so an argument to specify whether to raise an exception or fail silently when something is not implemented, with a default of raising the exception, so that the user sees what is going on * camera position and look_at would be arguments to these two functions * __add__ function * a function to compute a "rather nice" camera layout, for example, get a least-squares plane to fit to the centers of objects in the scene, placing the camera along the normal looking back at the scene, and moving back far enough to see the majority of the scene * an attribute to keep track of whether any deformations have been applied or not, for Tachyon (can't handle deforms) * a function to return a list of what parts of the scene would raise a not implemented error, given a renderer * class Graphics3D_Primitive(Graphics3D) * function for each one of (renderers) that is declared to return a not implemented error in the base class, so that only overwriting is necessary in specific primitives * function get_texture * class Deformation * hidden from the user: corresponding deformation functions (lowercase d) will produce a Graphics3D container instance containing the Deformation class instance, so that type(G) == Graphics3D, not == Deformation * deformations in a scene would store as a nested structure of deforms, like vrml * an easy recursive function to generate a scene of lazy objects from the nested structure * primitives: planes, spheres, finite and infinite cylinders, tori, triangles and smooth triangles, lights, boxes, blobs, cameras * deformations: translate, rotate, scale, skew...