Commit d84799e0 by Matheus Müller

### Melhorias em Drag_rectangle2, operacional mas ainda sem remocao de pontos.

parent 167cdb61
 from pylab import * #xy0 = np.loadtxt('H2.py') ##################################################################################################### # Funcoes que corrigem erros de arredondamento ... ... @@ -32,7 +30,7 @@ def montaperfil( xy , step, modo): if modo == 'step': for i in xy: for j in arange (u, i[0], step): if j>max(xy[:,0])/2 : if j>max(xy[:,0])/2 and j<=len(xy) : concent[math.ceil(j/step)] = i[1] else : concent[math.floor(j/step)] = i[1] ... ... @@ -41,16 +39,11 @@ def montaperfil( xy , step, modo): if modo == 'reta': for i in xy: for j in arange (u, i[0], step): if j>max(xy[:,0])/2 : concent[math.ceil(j/step)] = yu + (j-u)*(i[1] - yu)/(i[0] - u) else : concent[math.floor(j/step)] = yu + (j-u)*(i[1] - yu)/(i[0] - u) u = i[0] for j in arange (u, round(i[0],2), step): concent[round(j/step)] = yu + (j-u)*(i[1] - yu)/(i[0] - u) u = round(i[0],2) yu = i[1] fix2(concent, profundidade) print concent plot(profundidade, concent) show() return concent