If you're new to Python
A VPython tutorial
Pictures of 3D objects
Choose an object:
Work with objects:
Windows & Events:
What's new in Visual 5
The ring object is circular, with a specified radius and thickness and with its center given by the pos attribute:
ring(pos=(1,1,1), axis=(0,1,0), radius=0.5, thickness=0.1)
The ring object has the following attributes and default values, like those for cylinders: pos (0,0,0), x (0), y(0), z(0), axis (1,0,0), length (1), color (1,1,1) which is color.white, red (1), green (1), blue (1), opacity (1), material, and up (0,1,0). As with cylinders, up has a subtle effect on the 3D appearance of a ring unless a non-smooth material is specified. The axis attribute only affects the orientation of the ring; the magnitude of the axis attribute is irrelevant. Additional ring attributes:
of the central part of the ring, default = 1, so
thickness The radius of the cross section of the ring (1/10th of radius if not specified), not the full diameter as you might expect.
Note that the pos attribute for cylinder, arrow, cone, and pyramid corresponds to one end of the object, whereas for a ring, sphere, and box it corresponds to the center of the object.
If you include make_trail=True when you create the object, a trail will be left behind the object as you move it. For related options, see Leaving a Trail.
See description of Additional Attributes available for all 3D display objects.