claczny / VizBin

Repository of our application for human-augmented binning
27 stars 14 forks source link

Problems in polygonal selection with very deep zooming #12

Open claczny opened 9 years ago

claczny commented 9 years ago

When zooming in deeply and doing a polygonal selection it seems that the decision if a point belongs to a cluster (contains()) becomes problematic: screen shot 2014-12-02 at 08 13 44 The polygon clearly contains more than 2 sequences.

This seems to happen only when zooming in very deeply so it may not be a frequent problem. Nevertheless, this needs to be checked/fixed.

claczny commented 9 years ago

This seems to be related to the rounding which is necessary for Awt.Polygon.addPoint(int x, int y). Since we need to provide int but the mouse clicks produce double, we have a significant loss of precision here. The attached figure illustrates this nicely: two of the y-values get rounded to 64 (see debug message in background terminal) and thus only one point is left. The upper points have y > 64 and are thus ignored. screen shot 2014-12-02 at 08 24 29

While the scale-factor (scale) in DataSetFactory.createDataSetFromPointFile(new FileInputStream(inpointsfile), labelsIS, scale); allows to overcome this to a certain extent (simply use a "large enough" scaling factor) there might always be situations where the zooming is so deep that the rounding will cause problems.