Ask Your Question
1

Adding arrows in vector fields

asked 2015-01-01 19:01:48 +0100

Jeff Ford gravatar image

updated 2015-01-14 11:34:31 +0100

FrédéricC gravatar image

I'm using plot_vector_field3d, and I'm not getting any arrows at the ends of the vectors. The documentation seems to indicate this would be automatic. Is there something I'm missing?

edit retag flag offensive close merge delete

Comments

1

Could you please provide an example with missing arrows ?

tmonteil gravatar imagetmonteil ( 2015-01-03 08:40:17 +0100 )edit

Here's the full code

x,y,z,r,delta = var('x','y','z','r','delta')

epsilon = 400 delta = epsilon/400

h=spline([(0,0),(delta,1),(delta/2,1/2),(delta/4,1/8),(3delta/4,7/8),(delta/100,0),(99delta/100,1)])

def f(r): if r >=0 and r <=2delta: return 1 elif r>=2delta and r<= 3delta: return h(3delta-r) elif r>=3delta and r<=4delta: return 0

def g(z): if z >=0 and z <= delta: return 0 elif z >= delta and z<=2delta: return h(z-delta) elif z>=2delta and z<=3delta: return h(3delta-z) elif z>=3delta and z<=4delta: return (-1)h(abs(3delta-z)) elif z>=4delta and z<=5delta: return (-1)h(abs(z-5delta)) elif z>=5delta and z<=6delta ...(more)

Jeff Ford gravatar imageJeff Ford ( 2015-01-03 14:18:54 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2015-01-04 23:07:50 +0100

Jeff Ford gravatar image

It does seem to work in a local copy of Sage, but not in the online viewer

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2015-01-01 19:01:48 +0100

Seen: 372 times

Last updated: Jan 01 '15