So I need to get N number of values between 0 and 1. The values should be evenly spaced. Thats easy...
However, I also want another variable X that will shift the resulting values closer to 0 or 1.
So for example,
N = 4
X = 0
result = .2, .4, .6, .8 (evenly spaced)
Changing X would result in something like,
N = 4
X = .5
result = .35, .6, .75, .85 (more numbers closer to 1)
As well as
N = 4
X = -.5
result = .15, .25, .4, .7 (more numbers closer to 0)
I feel like the answer should be simple....
Currently, this seems to work for shifting values closer to 0, where i is the current result being calculated. ie, if N = 4 and X = .5 the results are, .11, .25, .43, .67
$$ r_i = \frac {i-(X*i)} {N + 1 - (X*i)}$$
You could try something like $$ a_i = \frac i{N+1} + X\cdot \frac{i(N+1-i)}{(N+1)^2}$$