schrodinger.graphics3d.polygon module

Maestro 3D polygons.

The polygon module allows creation and drawing of polygons. Clients draw using Group instances not through Polygon instances.

Control over the vertices, color, and transparency of a polygon are provided. See the Polygon class for more info.

To draw any number of polygons create the Polygon instances and add them to a Group instance (PolygonGroup can be used and is a synonym). Then invoke the Group’s draw() method.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.graphics3d.polygon.MaestroPolygon(vertices, color=None, opacity=1.0, style=1)

Bases: schrodinger.graphics3d.common.Primitive

__init__(vertices, color=None, opacity=1.0, style=1)

Creates polygon object in Maestro.

Constructor requires:

vertices: List of vertex coordinates (x, y, z).

Specify at least 3 vertices in consecutive order. All vertices must be in the same plane.

color: One of:

Color object (Color class) Color name (string) Tuple of (R, G, B) (each a float in range 0.0-1.0)

Optional arguments:

opacity: 0.0 (invisible) through 1.0 (opaque)

Defaults to 1.0

style: LINE or FILL. Default is FILL.