Differences between revisions 7 and 8
Revision 7 as of 2007-02-19 21:54:50
Size: 2345
Editor: dhcp46-70
Revision 8 as of 2008-11-14 13:42:04
Size: 2349
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Pre-SAGE Days talk [attachment:Sage3D.pdf] Pre-SAGE Days talk [[attachment:Sage3D.pdf]]
Line 6: Line 6:
  * Preliminary patch [attachment:graphics3d-0.1.hg]   * Preliminary patch [[attachment:graphics3d-0.1.hg]]

3d object arithmetic / integration with tachyon

Pre-SAGE Days talk Sage3D.pdf

For the brave:

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...

days3/sprints/3d (last edited 2008-11-14 13:42:04 by localhost)