!if (y(i).ge.(theta1s*x(i)+(y1-theta1s*(x0-y0w)))-((1+y1s)*(abs(sp02)/(2.d0*psis))) .and. y(i).lt.(theta1s*x(i)+(y1-theta1s*(x0-y0w)))+((1+y1s)*(abs(sp02)/(2.d0*psis)))) then
!elseif (y(i).lt.(theta1s*x(i)+(y1-theta1s*(x0-y0w)))-((1+y1s)*(abs(sp02)/(2.d0*psis))) .and. y(i).lt.(-theta1s*x(i)+(y1+theta1s*(x0+y0w)))-((1+y1s)*(abs(sp02)/(2.d0*psis)))) then
!elseif (y(i).ge.(-theta1s*x(i)+(y1+theta1s*(x0+y0w)))-((1+y1s)*(abs(sp02)/(2.d0*psis))) .and. y(i).lt.(-theta1s*x(i)+(y1+theta1s*(x0+y0w)))+((1+y1s)*(abs(sp02)/(2.d0*psis)))) then