Home

If you're new to Python
and VPython: Introduction

A VPython tutorial

Pictures of 3D objects

What's new

Classic VPython web site
VPython license
Python web site

 
points
points

The points object is essentially the same as the curve object except that it displays individual points at the specified positions instead of connecting them with lines, and it does not have origin, size, axis, or up attributes, nor does it have a rotate method. The points are rendered as spheres.

The points object takes a list of points for pos, like the curve object. The following statement will display two points, each of radius 50 pixels:

points(pos=[vector(-1,0,0), vector(1,0,0)], radius=50,           color=color.red)

The points object is similar to a curve, but with disconnected points. As with curve, the pos attribute is an array of points. The size of the points is specified by radius and the default radius is 2.5, meaning a sphere whose radius is 2.5 pixels (a diameter of 5 pixels). The radius attribute is in screen pixels if size_units="pixels" (the default), but if size_units="world", the radius is in the same terms as other objects. Setting the radius to 0 is the same as not specifying a size, in which case the radius will be 2.5 pixels, just as a curve is thin if its radius is specified as 0.

The options for manipulating a curve can also be used with the points object, but when appending an additional point you can't specify the point radius; you can only specify the pos and color.