Y
Yi-Yu Chou
Dear all,
I want to use line segments to display a 3D vector field.
However, my progrm becomes very slow when displaying this vector field if
the number of lin segments is very huge. Is there any better method to do
it ?
Thanks in advance !!!
Below is my code :
line = []
line_mapper = []
self.line_actor = []
for i in range(0, vf_points.num):
line.append(vtkLineSource())
line.SetPoint1(vf_points.x,vf_points.y,vf_points.z)
line.SetPoint2(vf_points.x + vf.vx,vf_points.y +
vf.vy,vf_points.z + vf.vz)
line_mapper.append(vtkPolyDataMapper())
line_mapper.SetInput(line.GetOutput())
self.line_actor.append(vtkActor())
self.line_actor.SetMapper(line_mapper)
self.line_actor.GetProperty().SetLineWidth(1)
self.line_actor.GetProperty().SetColor(0,1,1)
self.line_actor.PickableOff()
self.tar_renderer.AddActor(self.line_actor)
_________________________________________________________________
¥[¤J MSN ªÀ¸s¡G¾Ö©ê¸s²³¡B¤À¨É¸gÅç¡Bµo²{¥Í¬¡ªº¼Ö½ì
http://groups.msn.com?pgmarket=zh-tw
I want to use line segments to display a 3D vector field.
However, my progrm becomes very slow when displaying this vector field if
the number of lin segments is very huge. Is there any better method to do
it ?
Thanks in advance !!!
Below is my code :
line = []
line_mapper = []
self.line_actor = []
for i in range(0, vf_points.num):
line.append(vtkLineSource())
line.SetPoint1(vf_points.x,vf_points.y,vf_points.z)
line.SetPoint2(vf_points.x + vf.vx,vf_points.y +
vf.vy,vf_points.z + vf.vz)
line_mapper.append(vtkPolyDataMapper())
line_mapper.SetInput(line.GetOutput())
self.line_actor.append(vtkActor())
self.line_actor.SetMapper(line_mapper)
self.line_actor.GetProperty().SetLineWidth(1)
self.line_actor.GetProperty().SetColor(0,1,1)
self.line_actor.PickableOff()
self.tar_renderer.AddActor(self.line_actor)
_________________________________________________________________
¥[¤J MSN ªÀ¸s¡G¾Ö©ê¸s²³¡B¤À¨É¸gÅç¡Bµo²{¥Í¬¡ªº¼Ö½ì
http://groups.msn.com?pgmarket=zh-tw