SISinusWaveView
SISinusWaveView copied to clipboard
About damping formula
Hi Raffeal,
I have read the source code as well as the explaining comment many times but I still can't figure out the damping formula that you used. Particularly this part:
if (value > _dampingAmplitude) _dampingAmplitude += (fmin(value,1.0)-_dampingAmplitude)/4.0;
else if (value<0.01) _dampingAmplitude *= _dampingFactor;
_amplitude = fmax( fmin(_dampingAmplitude*20, 1.0), _idleAmplitude);
Why did you choose 4.0 as divisor, 0.86 (~ sqrt(3)/2) as damping factor, and multiply dampingAmplitude by 20 after all?
I'm really keen on the beauty of maths in this animation, so I'm looking forward to your to hearing from you. Thanks :+1:
How can I set the gradual-changed color for my wave view ? Thank you.