Howdy, My general problem is as follows: I have a large set of data composed of connected points. Instead of using plot3D, I'm currently creating a scalar_scatter structure, specifying the edges, and applying a tube_filter. To better reflect my data, which is a large group of capsules (cylinders capped with hemispheres) linked together into separate chains, I would like to insert spheres (glyphs) at all the points, but I've had a hard time matching the scaling of the tubes to the glyphs. I'd like the spheres and the tubes to have the same radius(specified by the scalar data) within a given chain.
So I already know about the existence of the tube_filter 'vary_radius' and 'radius_factor' attributes, and the glyph 'scale_factor' and 'scale_mode' attributes, but I haven't been able to piece everything together to make it work like I want. I think I'm getting confused about the units I use in my x,y,z coordinates I input to the data structures and the drawing coordinates used to make the visualizations. Below is a snippet of my code: src = mlab.pipeline.scalar_scatter( tubesX, tubesY, tubesZ, scalars) src.mlab_source.dataset.lines = pairs pts = mlab.points3d(tubesX, tubesY, tubesZ, scalars,scale_mode = 'scalar') tubes = mlab.pipeline.tube(src,tube_sides = NUM_SIDES) tubes.filter.vary_radius = 'vary_radius_by_scalar' mlab.pipeline.surface(tubes) Where "scalars" is an array of radii for the tubes and points in the same units as the x,y,z coordinates I use for the position data. Currently this gives me very thin tubes and big spheres. If anyone could show me where I'm going wrong, I would greatly appreciate it. It's probably a very naive question, but I'm new to mayavi, vtk, and python in general, so I am certainly naive. Thanks, Adam K
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ MayaVi-users mailing list MayaVi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mayavi-users