I have a number of lines which are all part of a single segment.  When I
plot them all individually, it takes a long time, much longer than plotting
more complicated meshes.  Is there a way I can display the lines more
efficiently?  Is there a way I can make these one object in mlab, so when I
use the toolbar I don't get 30 different LineSource objects?

CODE:
from enthought.mayavi.mlab import plot3d
import numpy

# Create Example Coordinates
xyz=[]
for ii in xrange(50):
    xyz.append(numpy.array([[0,0,0]]))
    for jj in xrange(100):
        translation=xyz[ii][-1]+numpy.random.random((1,3))
        xyz[ii]=numpy.concatenate((xyz[ii],translation),axis=0)

# Display (This is the part I need to optimize)
for ii in xrange(50):

plot3d(xyz[ii][:,0],xyz[ii][:,1],xyz[ii][:,2],tube_sides=7,tube_radius=0.1)

ENDCODE


(Also, as you can see in the demo below, each segment has a little space
between them.  Is there any way I can connect them better so there is no
space between them? I was thinking about creating a sphere at each vertex to
fill the gap.)

Thanks again,
--Tom
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to