>Hi!
>
>I need to generate positions and connections for a 2d grid which
>is in polar coordinates and has r logarithmically spaced [I'm
>writing an input module for custom MHD generated data]. For now
>I explicitly enumerate all positions in the grid (as documentation
>does not mention other than cartesian coordinates at all) and
>create connections using
>  DXMakeGridConnectionsV(2, &{ nx, ny });
>which does work, but lacks the connections from phi=0 to phi=360.
>
>I discovered DXNewMeshArrayV now and would ask if it would work to
>combine two paths, one circular and one straight to form the
>connections or how to add the missing connections by hand (I assume
>DXMakeGridConnectionsV does use quads?), i.e. how exactly is the
>connections array laid out? (or where in the documentation I can
>find about internal representation of the connections/points arrays)
>
>Thank you very much, Richard.
>

Consider the problem so:
A 2D XY mesh of regular positions is to be warped topologically into a disc
(ignore the log spacing initially). Result is identical topologically (only
the positions have moved).

Start with the flat 2D XY grid (mesh). To join one end to the other (that
is, min X to max X), use Slab in dimension 0 with 0 thickness, at all
positions. This yields a group of infinitely thin 2D slices in order along
the X axis. Select the 0th member (the first, or leftmost), and Append it
to the end of the group. Then Stack. Result, you have a new stack of slices
in which the first and last are identical positionally, but the mesh now
joins the last to the first.

Note that this can be done only on a regular mesh (Slab). It doesn't matter
whether you've moved the positions into a disc or left them as X-Y grid
since you are only manipulating the topology of the mesh. However, until
you warp the mesh, you'd have long lines that stretched across the width of
the mesh.

Finally, map X values from minX-maxX to 0-6.28 (radians), apply a Compute
to generate the log distribution within this range, and do a rectangular to
cylindrical warp. The mesh will be dragged along to connect the new
positions.

I described the problem the way it would be done in the UI, but you can
prototype it there, then find the appropriate DXModule calls if you insist
on writing your own module to do this (it's probably not necessary).

Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]

Reply via email to