Re: Animation missing steps

Hello Bill,

Thanks for the response.

On Wed, Jul 23, 2003 at 04:38:10AM -0500, Bill Hibbard wrote:
...
> Thanks for the test program. Yes, this is the expected
> behavior. When there are multiple Sets in the data for
> a RealType mapped to Animation, those Sets are merged.
> The merger constructs the Set with the smallest number
> of elements which covers all the elements of each Set
> being merged. By "covers" I mean that each element of
> each Set will be displayed at least once during the
> Animation. In your case, the merged Set doesn't include
> "2003-07-21 18:25 +0000" because that value is covered
> by "2003-07-21 18:00 +0000", and doesn't include
> "2003-07-21 23:25 +0000" because that value is covered
> by "2003-07-22 00:00 +0000". If you don't like the
> default merged Set, you can override it with the
> AnimationControl.setSet() method.

How does "2003-07-21 18:00 +0000" cover "2003-07-21 18:25 +0000"?  Is it
because the time from the 18:25 sample to the 18:00 sample is less than
half-way from 18:25 to 17:25?  (I hope that's clear.)

Also, the program that this was extracted from does use setSet.  I've
just tried modifying the test program by making a new Gridded1DDoubleSet
with all the time samples in order and passing that to setSet(), and
those two samples are still missed.

I added these lines near the start:

  // dates1 and dates2 merged and sorted.
  static String[] allDates = new String[] {
        "2003-07-21 13:25 +0000",
        "2003-07-21 14:25 +0000",
        "2003-07-21 15:25 +0000",
        "2003-07-21 16:13 +0000",
        "2003-07-21 17:25 +0000",
        "2003-07-21 18:00 +0000",
        "2003-07-21 18:25 +0000",
        "2003-07-21 19:25 +0000",
        "2003-07-21 20:25 +0000",
        "2003-07-21 21:25 +0000",
        "2003-07-21 22:13 +0000",
        "2003-07-21 23:25 +0000",
        "2003-07-22 00:00 +0000",
        "2003-07-22 06:00 +0000",
        "2003-07-22 12:00 +0000",
        "2003-07-22 18:00 +0000",
  };

And this in main:

    double[][] allDoubles = new double[1][allDates.length];
    for (int i=0; i<allDates.length; i++) {
      allDoubles[0][i] = date2double(allDates[i]);
    }
    Gridded1DDoubleSet animationset = new Gridded1DDoubleSet(RealType.Time,
                                                             allDoubles,
                                                             allDates.length);
    animationControl.setSet(animationset);


setSet() did not seem to have the desired effect.  Have I missed
something?


Thanks
Russell




-- 
Russell Steicke