t
has to be between 0 and 1 in your interpolation function, but you are passing values between 0 and 100. Change your calls to lerp(i/100.0f, a, b)
and so on. (It is important that you specify the 100.0 as a floating point literal, NOT an integer literal!)
As DarenW correctly points out, you have to cover the range from 0 to 1 for every segment for the desired effect, i.e. in your case, lerp(i/30.0f, a, b)
, lerp((i-30)/50.0f, a, b)
, etc.