Overview of Python & VPython

  "Welcome to VPython" tutorial

  Introductory Videos

  Pictures of 3D objects




  VPython 7 web site
  VPython license


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 simple_sphere objects, for maximum display speed.

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. If size_units="world", the default radius is 0.5.

With size_units="pixels" in effect (the default), a point in the z = 0 plane will have the specified radius, but it will be larger or smaller than the specified radius if it is nearer or farther from the camera.

Unlike a curve object, a points object can be transparent (opacity < 1).

The options for manipulating a curve can also be used with the points object, but currently the points object doesn't handle changes in axis or size, does not have an origin nor a rotate method, nor can it be made into a compound.