Re: help appreciated ...

Hi Rupert,

Sets are immutable, so to change the location of your
points you'll have to construct a new DelaunayCustom,
a new Irregular3DSet and a new FlatField, then pass
the FlatField to tetref.setData(). Hopefully this won't
be too slow for you - the good news is that DelaunayCustom
is constructed much quicker than the other Delaunay
subclasses. You may be able to speed it up a bit more
by saving the Vertices, Walk and Edges arrays constructed
by your first call to the DelaunayCustom constructor, then
passing them to subsequent DelaunayCustom constructors.

Good luck,
Bill

On 5 Oct 2006, Rupert Ford wrote:

> Hi,
>
> I have an a set of points (pts) which I display (the surface of) using an
> Irregular3DSet and a Delaunycustom. I can happily add and visualise
> dependent/range variables over this set.
>
> My problem is that I now want to be able to change the positions of the
> points (pts) and have the shape of my object change appropriately. I'm sure
> this is simple, but I'm afraid I can't see how to do it.
>
> Thanks for any help
>
> The most relevant lines of code are ...
>
>     xyz = new RealTupleType(x, y, z);
>     delaun = new DelaunayCustom(pts, tri);
>     gsp = new Irregular3DSet(xyz,pts,null,null,null,delaun);
>     vals_rgb = new FlatField( func_rgb, gsp);
>     final DataReference tetref = new DataReferenceImpl("tet");
>     tetref.setData(vals_rgb);
>     display.addReference(tetref);
>
>     // after visualising I want to change the values of array
>     // "pts" and have the display change accordingly
>
> -- Rupert
> --
> Research Fellow
> Centre for Novel Computing,   rupert@xxxxxxxxxxxxxxxx
> School of Computer Science,   http://www.cs.manchester.ac.uk/cnc
> The University of Manchester  +44 (0)161 275 5724
>
> Manchester United fans:
> Join The Manchester United Supporters Trust
> http://www.mufctrust.org
>
> ==============================================================================
> To unsubscribe visad, visit:
> http://www.unidata.ucar.edu/mailing-list-delete-form.html
> ==============================================================================
>
>

==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================