Package Scientific :: Package Visualization :: Module VPython :: Class Polygons

[frames] | no frames]

# Class Polygons

    GraphicsObject --+
                     |
           ShapeObject --+
                         |
                        Polygons

Polygons

Instance Methods

__init__(self, points, index_lists, **attr) |

show(self, window) |

Inherited from `ShapeObject`: `__add__`, `display` Inherited from `GraphicsObject`: `__copy__`, `__getitem__`, `__setitem__`

Class Variables
Inherited from `ShapeObject`: `attribute_names`

Method Details

### __init__(self, points, index_lists, **attr)
(Constructor)

Parameters:
  - `points` (sequence of Scientific.Geometry.Vector) - a sequence of points
  - `index_lists` (sequence of `list`) - a sequence of index lists, one for each polygon. The index list for a polygon defines which points are vertices of the polygon.
  - `attr` - graphics attributes as keyword parameters
Overrides: GraphicsObject.__init__