>I  have some numerical simulations with the output as 2-d x,y data:
>x0 y0
>x1 y1
>.. ..
>The data range for all the simulations is 0<x<6.28, 0<y<1.  The data are
>scattered points and each
>file may have a different number of data points than others.  I change a
>numeric parameter
>and generate a new file.  My import .general file uses points, 2-vector,
>floats, and positioin dependancy. I can
>look at one file with a simple net:
>
>import-mark(postions)-autocolor-image
>
>What I would really like to do is to combine the 2-d data into a large 3-d
>object. I tried the following unsuccessfully to try and combine just two:
>
>import1-mark1-
>              =collect series-stack-autocolor-image
>import2-mark2-
>
>My questions are:
>1)How do I do this at all?
>2)How do I index the "z" direction by the numeric parameter from the
>simulations?
>3)How do I do this gracefully, so maybe I don't need a separate import for
>each data file?
>
>Thanks for any suggestions.
>-Randy



Biggest advice is now that you've gotten your feet wet, you can abandon the
.general format and start using the DX Native File Format (much more
extensible, though in fact, you could solve this problem with .general).
Read Users Guide, Appendix B.2, Section 7 which shows the basic structure
of a series file (read it in the PDF format, as the html got trashed
somewhat, esp. in the Native File Syntax sections). The PDFs are now linked
on the opendx site (thanks to Dave Thompson!). Note that you don't have to
(and I don't recommend) put the data values inline with the object headers:
you can refer to the data "over there" in those other files, thus keeping
the native file headers simpler to read, generate, modify, etc. In fact, I
almost never put the data in line whether it's ASCII or not (certainly
never binary in line!). This keeps the .dx files real easy to modify and
the data in its natural form. At this level, it's the same as using a
.general file to point to the raw data file. But, you can't easily
construct many more hierarchical objects that DX can understand, using only
.general format.

That said, the "series position" value is precisely what Stack uses to make
the 3rd dimension Z value. However, I don't believe Stack works except on
gridded data (not scattered data).

You need to consider using product arrays, which should permit you to
"multiply" your scattered 2D positions by a Z value thus producing 3D
points that share the same Z value. For each member of the series, this Z
is different. When you Import the one series object (one Import only), and
display using your first net, everything will be where you want it. The
lazy way is to use a bunch of Imports and a bunch of Translates, but you'd
still have to get that pesky "series position" value from the data somehow.
It's part of the series member declaration (an attribute) when you use .dx
format.

I guess I'm assuming you are writing or can write some simple code to
auto-generate text files in some favorite language, esp. if you plan to
make many future data files. Or you can laboriously hand-edit together the
series file header (in .dx format, not .general) then modify it as you
change the data sets in the future.

Believe me, once you learn .dx format you'll never look back and doors will
open within DX that are not accessible from .general format.


Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]
(607) 257-8335 or (607) 254-8794

Reply via email to