I've been searching forever on this, but my search-foo seems weak.
I have an array of items that I want to calculate a curved distribution of strength (from 0 to 1) based on some index value. For example with items [ {}, {}, {}, {}, {} ] (they're all objects in an array, so in this case there's 5 of them), so if I say the index is 3.7 (a floating point, the precission can vary, and represents the peek of distribution), I want back a distribution of strengths in a bell curve on both sides for my items.
I want to create a slider control for 100% (all items), and a strength curve / values for each item based on where I slide it to. A bonus would be some left/right smoothing as I reach the min/max values of the index, with an option to smooth the beginning and end for some looping functionality. In the end it will be a slider that controls the transparency of a number of objects from where the slider is currently at, so as you slide back and forth there's a nice easing curve of transparencies applied to the objects / layers.
I realize that even better would be if the easing and shape of the curve also can be controlled (by a size distribution value? maybe a curve shape? [wave,triangle,etc.]) but I might be getting ahead of myself.
Surely I'm not unique in trying to figure this out, but I must be searching for all the wrong things. I'm not a math guy, but I've tried all sorts of gaussian or bezier and spline and smoothing distributions of items / points from an index, and all sorts of variants and distributions and normalisations. I feel stupid. Please help. (I've tagged it as JS as that's my target, but anything will do)