Package Scientific :: Package Visualization :: Module VPython :: Class Cube
[hide private]
[frames] | no frames]

Class Cube



GraphicsObject --+    
                 |    
       ShapeObject --+
                     |
                    Cube

Cube

The edges of a cube are always parallel to the coordinate axes.

Instance Methods [hide private]
  __init__(self, center, edge, **attr)
  show(self, window)

Inherited from ShapeObject: __add__, display

Inherited from GraphicsObject: __copy__, __getitem__, __setitem__


Class Variables [hide private]

Inherited from ShapeObject: attribute_names


Method Details [hide private]

__init__(self, center, edge, **attr)
(Constructor)

 
Parameters:
  • center (Scientific.Geometry.Vector) - the center of the sphere
  • edge (positive number) - the length of an edge
  • attr - graphics attributes as keyword parameters
Overrides: GraphicsObject.__init__

show(self, window)