silx-kit / silx

silx toolkit
http://www.silx.org/doc/silx/latest/
MIT License
129 stars 73 forks source link

[ScatterView] Check if Delaunay is actually necessary #2709

Open vasole opened 5 years ago

vasole commented 5 years ago

Close to regular grids would be better represented by quads than by triangles. Furthermore, the Delaunay triangulation would not be necessary.

vasole commented 5 years ago

The above refers to the "Solid" visualization mode.

vasole commented 5 years ago

In fact, it would be enough to replace the overlay by an image instead of a set of triangles.

vallsv commented 5 years ago

I am not sure i understand. The use case is not the same.

Or you expect a function smart enough to decide if your data is regular or not?

vasole commented 5 years ago

I expect a function smart enough to decide if the data are regular or not.

t20100 commented 5 years ago

Checking that the data is a grid to avoid computing Delaunay triangulation should definitely be a good optimization... but that is not as replacing the visualization with an image with nearest interpolation, or that would lead to a different visualization.

I think we need more options to interpolate a scatter plot (issue #1910 already opened on that), and to me, what you're thinking of is a fast pass for nearest interpolation of scatter plot when it is a grid.

vasole commented 5 years ago

No, I am not thinking about a a fast pass for interpolation. I am just thinking at an alternative display mode. As said in the opening any other thing could come as a bonus but the correct thing would be to show the alternative display and use the actual data if interpolation is required.

t20100 commented 5 years ago

This is what I wanted to mean, I think we are saying the same thing.

There are different ways of doing it with small differences (e.g., image, voronoi, #2743, histogram with bin size chosen to have on point in each bin if the grid is really regular).

I'll make some demos of some of those. I'm fine providing many modes in the API, but I'd prefer to keep the number of options available from the GUI as small as possible. That being said, we need to add one for this case.