# Create a first 3d object with VPython # import the necessary methods from visual import * import time # create a cylinder # change its diameter and length cylinder(pos=(-5,0,0),axis=(4,0,0), radius = 0.5) # make the sphere really small and change its color sphere(radius=0.2, color=color.red) # let's create a virtual paper sheet in form of a very thin box paper = box(pos=(1,0,0), size=(0.1,5,5)) # now we move the paper in steps of 0.5 mm while True: for i in range(16): paper.x=i/4.0 time.sleep(0.5) for i in range(16): paper.x=4-i/4.0 time.sleep(0.5)