The one bit I had some trouble with is "or can be replaced with a unit vector (ux, uy, uz)" Does this mean that some lines have 8 entries and some have 9? If so, you'll need to write a custom importer since none of the standard ones will understand your format. But supposing that all are of the sort N x y z ux uy uz length radius, then I would import it using the spreadsheet format. You'll get a field with various components, by default given the names (I believe) column0, column1, etc.
The fundamental idea is to extract the bits you need and use Compute
to create the appropriate "positions"; you'll eventually need to make
a field with 2N positions, where N is the number of lines in your file: all
the endpoints of the tubes. You'll then create a "connections" component
connecting each pair of endpoints. I've created a very simple file with
2 tubes in it and a visual program to give you the idea:
(See attached file: testtubes.txt)(See attached file: tubes.cfg)(See
attached file: tubes.net)
The Tube module makes everything the same diameter; a trick is to use
RubberSheet to then bump the tubes out by the desired radius. I then
used Glyph to put balls on the ends, though I'm not entirely satisfied
with the visual effect. You may want to play around with it a bit. But
this should give you the idea.
_________________________________
Donna L. Gresh
Visual Analysis Group
IBM T.J. Watson Research Center
(914) 784-5049
[EMAIL PROTECTED]
Hi,
I would be grateful if somebody could describe how I can input a vector
field represented as tubes. The file format input is described thus:
N x y z sigma phi length radius
Where:
N is a label
(x, y, z) is the centre of the tube's long axis
(sigma, phi) are two angle describing the orientation
or can be replaced with a unit vector (ux, uy, uz)
length is the length of the tube (-L/2 -> +L/2)
radius is the radius of the tube
Would it then be difficult to place hemi-spherical caps on the ends of the
tubes?
Regards,
Rich
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
/_/ Richard A Bemrose /_\ Polymers and Colloids Group \_\
/_/ email: [EMAIL PROTECTED] /_\ Cavendish Laboratory \_\
/_/ Tel: +44 (0)1223 337 267 /_\ University of Cambridge \_\
/_/ Fax: +44 (0)1223 337 000 /_\ Madingley Road \_\
/_/ Mobile: +44 (0)410 168 873 / \ Cambridge, CB3 0HE, UK \_\
/_/_/_/_/_/_/ http://www.poco.phy.cam.ac.uk/~rb237 \_\_\_\_\_\_\_\
"Life is everything and nothing all at once"
-- Billy Corgan, Smashing Pumpkins
testtubes.txt
Description: Text - character set unknown
tubes.cfg
Description: Binary data
tubes.net
Description: Binary data
