Re: ArrayIndexOutofBoundsError in DelaunayClarkson constructor


>For my current problem I am working with a set of 3-d points, containing both
>negative and positive floats, e.g.:
>4.4819699 1.9885647 -2.6443447 
>4.4951286 2.4927572 -2.5328738 
>3.9916145 1.9832838 -2.7180349 
>4.4951286 2.4927572 -2.5328738 
>3.9972414 2.4809182 -2.5961201 
>3.9972414 2.4809182 -2.5961201 
>4.4951286 2.4927572 -2.5328738 
>4.4996872 2.5976676 -2.4984482 

We have worked hard to make the Delaunay triangulation code as robust as
possible.  However, co-located points (e.g., two or more data sites with the
same coordinates) still present a problem for the triangulation algorithms.  
I recommend you filter out co-located points from your sample set before
constructing a Delaunay object.

Also, a quirk of the DelaunayClarkson algorithm is that it rounds all input
values to the nearest integer before computing the triangulation.  Since your
data sites are closely clumped, you might achieve better results by scaling
your data up, so that there are no co-located points after rounding.  We have
implemented the visad.Delaunay.scale() method for scaling up samples, to
simplify the task.

>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -2
>        at visad.DelaunayClarkson.reduce(Compiled Code)
>        at visad.DelaunayClarkson.sees(Compiled Code)
>        at Code)
>        at visad.DelaunayClarkson.<init>(Compiled Code)
>        at Main.main(Compiled Code)

The DelaunayClarkson constructor should not be throwing
ArrayIndexOutOfBoundsExceptions.  If you would be willing to share your
sample set and code, I would like to diagnose this problem.  If possible,
please anonymous FTP the necessary files to, to the
pub/incoming directory, then send me an e-mail about it.


  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: