A also the 1st y= is ring it's X=max(min (x+sx*Sp, 224),0) Sorry for the mix up :(