>
>The simulation side would be quite obvious: I could employ the
>DXLink facilities to start dx from the simulation and feed positions
>and data (and connections?) via DXLSetValue to one or more DXLInput
>modules on the dx side. What I am unsure about is the required
>structure on the dx side. Is any of the predefined modules able
>to "add" or "append" these data to the data accumulated so far?
>Or would I have to code a module myself to acomplish this?
>
>

I have not done this, so this is speculative. Since you appear to be adding
a small subset of new positions and data at each time step, you don't
really want the overhead of creating a whole object, then "Appending" it to
an existing object (there is an Append, but it is for adding members to
groups, most commonly).

Instead, I would start by caching a pair of Lists, one for positions, one
for data, input through 2 DXLSetValue inputs, using 2 GetGlobal-SetGlobal
pairs, then appending your new info as short lists to the existing cached
lists. The "List" object is essentially like a simple array, without the
overhead of interconnected components that one sees in a Field.  You can
make a new list by feeding existing lists or single items or a combination
into the List module, so in your case, you retrieve the cached List from
GetGlobal, then append your new input list to make a new (longer) list,
then send that back to SetGlobal for the next iteration. Also, of course,
feed the output of List downstream for visualizing, as follows. You will
need to generate a Field to visualize, so you feed the positions list into
a Construct(origin) and the data list (which of course must correspond in
length, and have a one-to-one order correspondence with the position list)
into the same Construct(data). Construct makes the Field, then you can
visualize it. Since the data is vector, use AutoGlyph and get vectors for
free. Oh, Construct will add 1D line connections which you don't want, so
use Remove(connections) right after Construct.

You need connections if these positions are logically connected in 2 or 3D,
and  it is meaningful to interpolate data values across the spaces between
the positions. Since the positions are irregular, you would most likely
have to generate connections elements externally to DX, then feed them in.
This gets a bit trickier. "connections" is a DX component which is an array
of integer vectors whose components are indices into the positions list, so
you'll have to maintain state of the current highest position index to
define the new connections to positions that are added as time goes along.
I would start by seeing if you can clock the "scattered" (unconnected)
positions as vector glyphs at the speed you desire before tackling the
connections problem.

So to summarize, check out the samples on Get-Set modules. You probably
want to use the "global" versions since they retain state between
executions of the net, whereas the "local" versions lose state upon exit of
the macro they are typically embedded in. Also, turn off the Cache in the
Construct (and probably many other modules) since you will be creating a
new object each time step: you are likely to consume available memory
rapidly if you do not.

And, think about doing this in script mode: I have a sinking feeling that
at the rate you propose, the UI will not keep up. You use the DXUI to
develop the program and test it, but the ".net" file you save can also be
run in script mode, producing an Image window, but otherwise not attempting
to do all the other UI housekeeping (flashing green modules, etc.).

Let us know if it works, then post the working net or at least a writeup of
your solution! Thanks.

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