Advanced Point highlighting in fluid.plotter

Hello,

I’m quite new to flucoma
I am working with flucoma in max to make a polyphonic concatenative mffc granulator with fluid.plotter as a way do display my dataset.

My goal is that the distance between my mouse coordinates and the looked up points in the kdtree (using varying numneighbours) changes certain parameters in my playback engine like filtering, loudness etc. of each voice.
This i have figured out how to do but now i’d like also to have the distance from my mouse coordinates to each point be accentuated visually in the fluid.plotter, but haven’t found the right answer in the help patch.
I have a few ideas how that could be done but they all didn’t lead to the right thing.

  1. highlight size.
    I know that it is possible to highlight multiple points, but is it possible to have each highlight have a different size according to the distance? I didn’t find a way to change the size ratio between highlighted and not highlighted.
    Also i tried this with the pointsize argument but the points stay that size once changed. It would be cool to have a pointsize argument which behaved similar to the highlight argument, changing back to the original size after not being selected anymore.

  2. colors
    Maybe it is possible to change the colors of the points individually and dynamically? like a gradient, red for points at the mouse position and gradually towards black for points with greater distance.

  3. lines that connect the points to the mouse coordinates?

I think that both 1. and 2. could be done by resetting the values of each point as it is not queried, i thought i’d ask here first if something already exists before i do this myself.
Here a quick sketch of what it could look like:

Any ideas would be appreciated, thanks!
Thank you for these great tools, looking forward to working with that stuff.

1 Like

Hello @axelkolb

This is a great idea! Your best bet to code it is to not use highlight and to use pointsize and pointcolor, in conjunction with knearest and knearestdist, to get as many points within a radius as you want.

I hope this helps a bit? This is the sort of GUI that will excit @jamesbradbury I think :smiley:

Indeed it seems like you want to create something like figure 4.5.1 in my thesis: https://phd.jamesbradbury.net/projects/interferences#demo1