<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
yadin,<br>
in your code you only create one line, that is why you only see one.
You are trying to pass an array to a function that expects a single
tuple, and python apparently is casting it for you so that it all works
out. I don't think you want to use vtkLineSource for what you are
doing. You would be better of creating a vtkPolyData and adding a set
of points to it then adding line type cells ie VTK_LINE. Do you have
the users guide? it explains this.<br>
Burlen<br>
<br>
yadin Bocuma Rivas wrote:
<blockquote cite="mid240892.90963.qm@web51302.mail.re2.yahoo.com"
type="cite">i have 50 start points and 50 en points<br>
i want to plot lines between the given points<br>
in 3D <br>
i wrote a program doing something like it but ui can only see one line<br>
i think it is the last one....<br>
please help me to make ma program work.<br>
here i atached it <br>
than you
<p> __________________________________________________<br>
Correo Yahoo!<br>
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! <br>
Regístrate ya - <a class="moz-txt-link-freetext" href="http://correo.espanol.yahoo.com/">http://correo.espanol.yahoo.com/</a> </p>
<pre wrap="">
<hr size="4" width="90%">
import wx
import vtk
from wx.wxVTKRendererWindow.import *
start = (x1[i],y1[i],z1[i]) #those r the end1 point that i create (50 points)
#start = (0,0,1)
#start =(0,o,0.025)
#.....
end = (x2[i],y2[i],z2[i]) #those are the line or arrow end2 points that i create(50 points)
print start, end
app2 = wx.App() # i am using wx, instead of iren
# create the widget
frame = wx.Frame(None, title="magnetic field strength", size=wxSize(400,400))
widget = wxVTKRenderWindow(frame, -1)
ren = vtkRenderer()
widget.GetRenderWindow().AddRenderer(ren)
line = vtkLineSource() # i create a line and say it must get its coordinates from the previous
line.SetPoint1(start) #previous created start and end
line.SetPoint2(end) #why does it take only one
linesMapper = vtkPolyDataMapper()
linesMapper.SetInput(line.GetOutput())
linesActor = vtkActor()
linesActor.SetMapper(linesMapper)
ren.AddActor(linesActor)
# show the window
frame.Show()
app2.MainLoop()
</pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Burlen Loring
Information Technologist III
Space Science Center
Institute for the Study of Earth, Oceans, and Space
University of New Hampshire
39 College Road, Durham, NH 03824
Phone: 603-862-1140</pre>
</body>
</html>