As Karl has discovered, though, there's a flaw in this logic.
'b' yields a 'data' component that is now a scalar.
Thus, 'd' returns this scalar to "positions" (by default, since no other component is named for Unmark to direct the "data" back to.)
Therefore, 'f' should generate an error about trying to take the second component of a scalar.

On Wednesday, Mar 16, 2005, at 16:11 America/New_York, David Thompson wrote:

a = Mark(yourData, "positions");
b = Compute(a, a.0);
c = Include(b, 5, 10);
d = Unmark(c);

so to continue so you can clip y and z, do the following

e = Mark(d, "positions");
f = Compute(a, a.1);
g = Include(f, ymin, ymax);
h = Unmark(g);

... on to z.

David


This is one of those PITA problems in OpenDX. Would be nice if there was an all-purpose Include that did vectors also, but there isn't. So I think, Karl, that you need to do more structuring operations. I'm doing this in my head, so there may be errors:
1. Do a-c above.
2. This yields a field with original 3-vector positions (Mark simply copied them to 'data'), and either 'invalid positions' or a smaller field depending on your 'cull' setting. Let's assume 'cull' is true because handling 'invalids' can get messy in the upcoming operations.
3. You can't Mark a field twice in a row without an Unmark, since there is only room for one 'saved data' component and a 'marked component' flag is set by Mark. So my trick is to Unmark(field,"junk"). This >creates<(!) a new "junk" component, which preserves the original 3-vector positions (since they never moved), clears the 'mark' flag, returns the "data" component to its prior state (which might have been null), and clears out the "saved data" component for further use.
4. Now you can proceed with e-g. Follow with Unmark(field,"junk"). The old junk gets overwritten.
5. After doing this for z as well, you have a field with the original 3-vector positions (but fewer of them presumably). Any components like "colors" that were position dependent will have been trimmed by each successive cull operation along with the positions that got culled. Theoretically, "connections" got invalidated (or culled) as positions disappeared, but I can't do that in my head.
6. If it bothers you, Remove(field,"junk") discards the bogus component.


David,

Thanks for your suggestion and it has definitely pointed me in the right direction. What I am still not able to figure out is how to relate "d" (in your network snippet below) back to the y and z coordinates - Compute is passing only the x coordinates to Include. I can't include y and z in this Compute because then they will be operated on by the same Include, which won't work with the coordinates of the data and besides I would like to "clip" those axes independently. And having separate Computes and Includes for the x and y coordinates is not working, at least not the way that I have the network constructed.

Thanks for your help,
Karl


--
.............................................................................
David L. Thompson Visualization and Imagery Solutions, Inc.
mailto:[EMAIL PROTECTED] 5515 Skyway Drive, Missoula, MT 59804
Phone : (406)756-7472


_______________________________
Chris Pelkie
Scientific Visualization Producer
622 Rhodes Hall, Cornell Theory Center
Ithaca, NY 14853 (607) 254-8794

Reply via email to