_RL slopeSqTmp,slopeTmp,slopeMax
slopeTmp=sqrt(slopeSqTmp)
SlopeX(i,j)=SlopeX(i,j)*slopeMax/slopeTmp
SlopeY(i,j)=SlopeY(i,j)*slopeMax/slopeTmp