mastodon-sc / mastodon

Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
BSD 2-Clause "Simplified" License
66 stars 20 forks source link

Reduce number of points to be drawn in Grapher #219

Closed stefanhahmann closed 10 months ago

stefanhahmann commented 1 year ago

User Story

When using the Grapher, the navigation gets very slow in situations where many points are drawn.

grafik

Also, in these situations it is difficult to actually visually analyse the plotted data, since to much points lie on top of each other.

It would be good, if there was some level of detail, e.g. as it is common in maps:

grafik

Acceptance criteria

  1. Point reduction algorithm does increase UI performance of the grapher (and not decrease it by too complex algorithms)
  2. It should be possible for the user to find out, how much points are not drawn due to the level of detail

Task

To be discussed:

tinevez commented 10 months ago

Hello @stefanhahmann I would like to close this issue - at least temporarily - in the light of our recent discussion.

Indeed, a grapher that could harness rendering a full graph context with more than millions of points require some implementation Level of Details (LOD), as you pointed out above.

I actually starting working on it last year, trying to come up with an octree implementation for the rendering, or something based on the existing kd-tree. I was not happy with the results of the prototype, which exists on a branch. It looks cheap. It probably should redone properly.

But recently, I was reading a paper about a tool and discussing with its author: https://tissuumaps.github.io/ They display a large number of 2D points on an interactive canvas as well. For version 2 they used the level of details, but for version 3, as stated in the paper about it (https://www.sciencedirect.com/science/article/pii/S2405844023025136) they switched to a rendering engine based on OpenGL and simply gave up on the LOD. The main author told me that OpenGL could harness their thousands of million points without the need for that.

So I started working on an OpenGL grapher, which is here: https://github.com/mastodon-sc/mastodon-grapher-opengl

For now, it has fewer features that its non opengl counterpart, but should address the issue you mention. I suggest to reopen it if we are not satisfied with the first version of the opengl grapher.

stefanhahmann commented 10 months ago

I agree. Let's try the opengl first.