Commit d84799e0 by Matheus Müller

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

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