| 1 | initial version |
Yes, you can limit the proximity to the pole:
my_grad = [lambda x,y: grad[0].subs(x=x,y=y) if x^2 + y^2 > 0.1 else None,
lambda x,y: grad[1].subs(x=x,y=y) if x^2 + y^2 > 0.1 else None]
plot_vector_field(my_grad, (x,-1,1), (y,-1,1)).show()

or limit the length of the vectors:
grad_len = abs(grad)
my_grad = [lambda x,y: grad[0].subs(x=x,y=y) if grad_len.subs(x=x,y=y) < 7 else None,
lambda x,y: grad[1].subs(x=x,y=y) if grad_len.subs(x=x,y=y) < 7 else None]
plot_vector_field(my_grad, (x,-1,1), (y,-1,1)).show()

| 2 | No.2 Revision |
Yes, you can limit the proximity to the pole:
my_grad = [lambda x,y: grad[0].subs(x=x,y=y) if x^2 + y^2 > 0.1 else None,
lambda x,y: grad[1].subs(x=x,y=y) if x^2 + y^2 > 0.1 else None]
plot_vector_field(my_grad, (x,-1,1), (y,-1,1)).show()

or limit the length of the vectors:
grad_len = abs(grad)
my_grad = [lambda x,y: grad[0].subs(x=x,y=y) if grad_len.subs(x=x,y=y) abs(grad.subs(x=x,y=y)) < 7 else None,
lambda x,y: grad[1].subs(x=x,y=y) if grad_len.subs(x=x,y=y) abs(grad.subs(x=x,y=y)) < 7 else None]
plot_vector_field(my_grad, (x,-1,1), (y,-1,1)).show()

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.