I don't know if it would work, but could you make the triangle vertices a function of the line vertex? Something like this:
Code:
viz.startlayer(viz.TRIANGLES)
v1 = line.getVertex(1)
viz.vertex(v1[0]+1,v1[1],v1[2])
viz.vertex(v1[0]-1,v1[1],v1[2])
viz.vertex(v1[0],v1[1]+1,v1[2])
triangle = viz.endlayer(parent=line)