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

 
clone
ring

You can clone objects:

b = box(pos=vector(1,1,0), axis=vector(1,1,0),
             color=color.red)
bcopy = b.clone(pos=vector(1,-1,0))

This will give you two copies of a box, differing only in their positions. After making the clone, changes to the clone do not affect the original box.

If you simply say b.clone(), all of the properties of the new object are exactly the same as those of the original object.

Current restrictions

Currently you cannot clone triangles/quads, because it is the underlying vertex objects that control their appearance. You can clone compound objects.

Currently there is no way to clone an object from one canvas to another.