Hello,
I have a computational grid which looks like the attached image. There is
a minimum sized grid cell and all larger grid cells have a size equal to
some integer * the smallest grid cell size. I'm currently imaging this in
opendx by using an array of positions and (quad) connections.
Unfortunately the algorithm I'm using to write this to file is INCREDIBLY
slow.
Rather than writing an array of positions, can I use the
origin 0 0 0
delta 0 1 0
delta 1 0 0
etc... to describe regular positions for the finest grid, and irregular
quad connections? If so (and I hope the answer is yes) is the approach
the same as irregular positions/irregular conections; i.e. are the
connections still some offset into an array of positions?
Thanks a lot for any help!
Tom
Short answer. Yes. and Yes. As long as you can calculate the position
index it works as if the index list was expanded. Pretty sure this is
one of the examples in Appendix B.2 Users Guide.
I am a bit leery of the "swapped" deltas. You should check to see
that you are referencing the correct positions when constructing the
connections index list array, since DX tends to like X-slowest,
Y-next, Z-fastest ordering, and as written you will generate
X-faster, Y-slower. It might work as is (too early in the morning to
do it in my head). Getting it wrong will probably make "bad" polygons
cause the wrapping will be wrong (note that it is a Peano curve
wrapping, not a clockwise or counterclockwise wrap as in many other
3D programs). See the Users Guide for a pretty picture: only visible
in the PDF, the HTML image sucks (too compressed to see the indices).
DX doesn't directly support a quadtree object, but it might be
interesting to consider creating a hierarchical multigrid of "invalid
connections" to knockout (at different levels of refinement), the
losers in the grid. Seems theoretically doable but I haven't done it.
Maybe someone else has. I'm thinking you would still create the
superfine grid, then use regular connections as well instead of
figuring out all those indices. Probably a lot easier to calculate
the serial offset into the regular mesh to determine which
connections are valid, then Include (exclude=true) based on that
value. You might even be able to do all this within DX though I
imagined you were importing a data set generated by other code which
creates the quadtree.
Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]