I want to make some curves from 0 to 1.
I need to calculate the growth variables of y from 0 to 1. So I tried this
The calculation of a was made by more trying, in a primitive way.
What I want:
1. Where does the value of a come from?
2. How do I extend the calculation to get more curves with faster or slower growth?
3. Maybe find a variable of acceleration
I need to calculate the growth variables of y from 0 to 1. So I tried this
y result is 1 - worksint interations=1000;
float y, y_add=1./interations; // linear
for (int i; i<interations; i++) {
y += y_add; // linear
}
y result is 1 - worksfloat y_mlt = exp(-1/(interations)); // non linear slow grow on the first stage but fast grow in second
float a=0.582; // why it's 0.582 ?
y_add=a/interations;
for (int i; i<interations; i++) {
y = y*y_mlt + y_add; // non linear slow grow
}
y result is 1 - worksfloat y_mlt = exp(-1/(interations)); // non linear fast grow on the first stage but slow grow in second
y_add=(1+a)/interations;
for (int i; i<interations; i++) {
y = y*y_mlt + y_add; // non linear fast grow
}
The calculation of a was made by more trying, in a primitive way.
What I want:
1. Where does the value of a come from?
2. How do I extend the calculation to get more curves with faster or slower growth?
3. Maybe find a variable of acceleration
Last edited: