First time here? Check out the FAQ!

Ask Your Question
1

Adding arrows in vector fields

asked 10 years ago

Jeff Ford gravatar image

updated 10 years ago

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?

Preview: (hide)

Comments

1

Could you please provide an example with missing arrows ?

tmonteil gravatar imagetmonteil ( 10 years ago )

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 ( 10 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 10 years ago

Jeff Ford gravatar image

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

Preview: (hide)
link

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: 10 years ago

Seen: 393 times

Last updated: Jan 01 '15