ageller / Firefly

A WebGL interactive particle viewer
GNU Affero General Public License v3.0
66 stars 13 forks source link

Improve data selection process #181

Open ageller opened 1 month ago

ageller commented 1 month ago

Currently we have a sphere that is attached to the camera. This can be difficult to use because, for instance, there is a scenario where the sphere is behind all the data points but it looks like it is "inside" the data volume. (You can rotate the camera, and see the data rotate, but the sphere stays in the center of the screen, looking like it is inside the data volume.) I wonder if there is a better way to do this w/o having the selection sphere attached to the camera.

Another obvious option is to have the selection sphere live in a set location in space. Then we would need extra elements for the GUI to move the sphere in x,y,z -- I guess we could have buttons for + and - in each direction? Or maybe we could attach some kind of limited fly controls to that selection sphere and enable that with some keystroke (e.g., holding Ctrl). The downside there is that the selection sphere could easily get "lost" (way off screen). So we'd probably want another button to recenter the sphere. I imagine this would be more intuitive visually.

ageller commented 3 weeks ago

I still worry that having independent 3D control for the sphere could be more confusing/difficult than the current version (with sphere attached to camera). I wonder if we could instead change the color of the particles, for instance such that all particles at the same distance as the sphere (distance +/- radius) are bright, and the rest are faint (change alpha). This feature could be controlled with a checkbox.

Also, we could allow the user to select between a sphere and a cube (or other shapes, controlled by a dropdown).

agurvich commented 3 weeks ago

i like this idea, though it might be annoying to code up (though there has to be some math that's calculating the distance from the selection we could re-use).

it may also help to add a wireframe plane to help add some visual cues for how far away the sphere is (vs. the radius being small).

in terms of interaction you could click then move the mouse up to push the zplane further (mousing down to pull the zplane in). you could also make left and right can control the radius of the sphere too. maybe right click toggles selection shape? we could have the instructions in the interface.