Hi,
This is definitely possible. Here's a sample script I wrote a while back which creates a fading trail coming from the mouse position:
Code:
import viz
viz.go()
TRAIL_SIZE = 40
TRAIL_COLOR = viz.RED
history = []
viz.startlayer(viz.LINE_STRIP)
viz.vertexcolor(0,0,0,0)
viz.linewidth(2)
for x in range(TRAIL_SIZE):
viz.vertex(x,0.5,0)
trail = viz.endlayer(viz.SCREEN)
trail.dynamic()
trail.enable(viz.BLEND)
def mytimer(num):
history.append(viz.mousepos())
if len(history) > TRAIL_SIZE:
del history[0]
histsize = len(history)
for i in range(histsize):
trail.vertexcolor(i,TRAIL_COLOR+[i/float(histsize)])
trail.vertex(i,history[i][0],history[i][1])
viz.callback(viz.TIMER_EVENT,mytimer)
viz.starttimer(0,0.001,viz.FOREVER)
This probably doesn't do exactly what you want, but I think it should definitely be a good starting point.