From: liming x. <lm...@gm...> - 2012-10-19 15:39:59
|
Hi, I am new to VPython. I want to use this tool to do a project for my work. I create a clock pulse train using the few lines below. ---------------------------------------------------- from visual import * g = [] g.append(display(x = 0, y = 100, width=1000, height=400)) g[0].title="First try" c = curve( x = arange(-10,10,0.01), display=g[0],radius=0.07,color=color.yellow ) # Draw a helix c.y = ceil(sin( 5.0*c.x )) while True: rate(5) ----------------------------------------------------- Now I want to make the pulse train moving, from left to right, continuously. The points disapper from the right, then emerge from the left, ... Can someone help me? Thanks in advance. |