DiffuseMaterial()
Returns a material with the diffuse color attribute set to color.
EmissiveMaterial()
Returns a material with the emissive color attribute set to color.
A VPython scene is a collection of graphics objects that can be shown in a VPython window. When the "view" method is called, a new window is created and the graphics objects are displayed in it.
Constructor: Scene(objects=None, **|options|)
a list of graphics objects or None for an empty scene
options as keyword arguments: "title" (the window title, default: "VPython scene"), "width" (the window width, default: 300), "height" (the window height, default: 300), "background" (the background color, default: black)
Adds object to the list of graphics objects.
Open a VPython window for the scene.
Constructor: Sphere(center, radius, **|attributes|)
the center of the sphere (a vector)
the sphere radius (a positive number)
any graphics object attribute
Constructor: Cube(center, edge, **|attributes|)
the center of the cube (a vector)
the length of an edge (a positive number)
any graphics object attribute
The edges of a cube are always parallel to the coordinate axes.
Constructor: Cylinder(point1, point2, radius, **|attributes|)
the end points of the cylinder axis (vectors)
the radius (a positive number)
any graphics object attribute
Constructor: Arrow(point1, point2, radius, **|attributes|)
the end points of the cylinder axis (vectors)
the radius (a positive number)
any graphics object attribute
Constructor: Cone(point1, point2, radius, **|attributes|)
the end points of the cylinder axis (vectors). point1 is the tip of the cone.
the radius (a positive number)
any graphics object attribute
Constructor: PolyLines(points, **|attributes|)
a sequence of points to be connected by lines
any graphics object attribute
Constructor: Line(point1, point2, **|attributes|)
the end points of the line (vectors)
any graphics object attribute
Constructor: Polygons(points, index_lists, **|attributes|)
a sequence of points
a sequence of index lists, one for each polygon. The index list for a polygon defines which points in points are vertices of the polygon.
any graphics object attribute
A material defines the color and surface properties of an object.
Constructor: Material(**|attributes|)
The attributes are "ambient_color", "diffuse_color", "specular_color", "emissive_color", "shininess", and "transparency".