Vector2 Point Density Changing
I have a Vector2 list (Its actually a long loop of vector generation, but that doesent really matter),
it represents accuracy of a gun, (doesent really matter). Theese are generated using complex math and range from -1 to 1,
i want to change so they are more densly packed in the centre (centre being 0, 0), at the bottom of the page i have some examples that i will mention a few times. The cases i wish to get close to range from easy at the top - hard to do and very saitisfactory to my needs at the bottom (In my eyes that is).
Case One:
a simple exponential operation (remember, we have negative numbers)
some way of exponentially decreasing the values without changing the polarity. i tested to square and cube and hypercube, but the seemed to give me some really wierd results, propably my fault, i tried to make it work for a couple of weeks with no success.
examples would return (in order):
-0.25, 0.25
-0.49, 0.49
-0.01, 0.01
0, 0
-1, 1
Case Two:
a squaring operation with a variable. some form of squaring operation, maby using the variable as the exponent. i havent had time to try this yet. would return same as exponential operation with the same exponent as prevous case.
Last Case (And Best For Me):
changing depending on a curve.
provided a curve and the value the code will calculate inacuracy depending on the curve,
Im assuming that this is really easy and that i am being dumb for not coming up with it myself.
Examples:
-0.5, 0.5
-0.7, 0.7
-0.1, 0.1
0, 0
-1, 1